Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Text::CSV_XS - proposed new interface

by dragonchild (Archbishop)
on Dec 15, 2004 at 19:27 UTC ( [id://415165]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Text::CSV_XS - proposed new interface
in thread Text::CSV_XS - proposed new interface

The name Text::CSV_XS is a poor name and, IMHO, should be discarded in favor of an XS implementation of Text::xSV called Text::xSV::Fast. It could be included in the distribution and, if a C-compiler exists, should be compiled. Then, at install time, the user can choose if they wish to have the PurePerl version as the primary version or not.

I never understood the completely artificial separation between Pure-Perl versions and XS versions, not when we have an extensible build system that can require input from the installing user.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Replies are listed 'Best First'.
Re^4: Text::CSV_XS - proposed new interface
by jZed (Prior) on Dec 15, 2004 at 19:43 UTC
    I didn't choose the name, but I agree. I'm certainly not going to do away with Text::CSV_XS since, as I said it has many users, is included e.g. in many linux distros, etc. so would cause unpredictable incoveniences to drop the name. But I agree that it would be great to combine the two and I've suggested as much to Tilly previously - we've not done it out of time constraints rather than interest. If you look at Comparison of the parsing features of CSV (and xSV) modules, you'll see that Text::CSV_XS has several parsing options that Text::xSV does not (mostly things not needed in ordinary CSV parsing but quite useful for odd legacy formats) so the two modules have other differences than the perl/C differences. I think Text::xSV::Fast might be a good idea, why don't you write it? It could simply subclass Text::CSV_XS and provide some wrappers to implement the Text::xSV interface.
Re^4: Text::CSV_XS - proposed new interface
by bart (Canon) on Dec 16, 2004 at 10:02 UTC
    I never understood the completely artificial separation between Pure-Perl versions and XS versions, not when we have an extensible build system that can require input from the installing user.

    Surely at some point in time, you must have seen posts that say "I can't use a module because...". The most common reason quoted is lack of privileges for installing modules, the lack of tools, or lack of the necessary skill. In such a case, installing an XS module is next to impossible...

    At least Pure Perl modules don't actually require proper installation, they can be made to work perfectly with just a few manual kludges. In such a case, "installing" a module is in the same realm as doing so for a script.

      My point was that many distros should be able to provide an XS and a pureperl version of the same code. A perfect example would be Text::xSV. You have the pureperl version which anyone can cut'n'paste. Then, you have the XS version. If you aren't able to install it (for whatever reason), then you get to cut'n'paste. If you can, you get the speed boost.

      I still fail to see the problem ...

      Being right, does not endow the right to be rude; politeness costs nothing.
      Being unknowing, is not the same as being stupid.
      Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
      Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://415165]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-28 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found