in reply to "Perlifying" an XSpp method
I would like to write: ...
No you wouldn't :)
The beauty of mirroring the C++ api is you're mirroring the C++ api -- its like the same API, same names, same usage (basically)
If you want to change it, don't make it the same , same level of wordiness, same names, but with slightly different semantics, make it easy to use, like
yippy( sub { my($seq ) = @_; warn $seq; } ); sub yippy { my( $do_something ) = @_; my $reader = Compress::DSRC::Archive->new; my $seq = Compress::DSRC::FastqRecord->new; while ($reader->next_seq($seq)) { $do_something( $seq ); } }
I have a lot to learn about XS ...
:) Avoid XS as much as possible, unless you want to learn a lot about XS instead of just getting on with whatever task you have to complete :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: "Perlifying" an XSpp method
by jdv (Sexton) on Mar 09, 2015 at 03:23 UTC | |
|
Re^2: "Perlifying" an XSpp method
by Anonymous Monk on Mar 08, 2015 at 23:38 UTC | |
by jdv (Sexton) on Mar 09, 2015 at 03:31 UTC |