Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

They are not that expensive.

And even if they were remarkably more expensive, I'd still take "has an awesome implementation of regexes" over "does not have an acceptable implementation of regexes, but does have a few limited string processing methods that are fast". Luckily for Pythonistas, Python does have a reasonable regex implementation (pretty much the same as Perl in most regards, though not as nice to use), so it's not a problem.

But, I'm baffled that someone would suggest that a language is better because you can use more limited tools that might be marginally faster than extremely powerful and flexible tools. And, I'm also a little concerned that the previous post seems unaware of Perls other string processing tools...regexes are not the only tool in the toolbox. Perl is a monster for text processing. Regexes are the teeth...but there are also claws and horns and a pointy tail. I think Perl 6 also has laser eyes and breathes fire, but that might just be a rumor.



> But, I'm baffled that someone would suggest that a language is better because you can use more limited tools that might be marginally faster than extremely powerful and flexible tools

Because Python has both, and so much data is already split on common delimiters, and having a fast way to handle them is awesome?


Because Python has both, and so much data is already split on common delimiters, and having a fast way to handle them is awesome?

I know, and I said so. But, so does Perl (one of several "fast ways" of processing text in Perl is to use regexes, but it's not the only way). That's why I'm confused that you seem to think you're making differentiating statements about the two languages. That's all.

I happen to like Python, I just don't think it makes sense to present Python as a better text processing language than Perl...when, by most measures, including performance, it probably is not.


If there's there are string methods in Perl, great - I'll check this out next time I'm working on some Perl.

Unfortunately - and this is a cultural problem more than a technical one - nobody ever seems to use them, instead favoring RegExs for everything.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: