On Wed, Sep 2, 2009 at 23:20, Shawn H. Corey<shawnhco...@gmail.com> wrote: > Dave Tang wrote: >> >> I wanted to ask why is Perl, in comparison to other programming languages, >> so powerful in text processing? > > Undoubtedly, when it was written, Perl was the most powerful text processing > language available. This is no longer the case (thanks largely to Perl :). > Today's scripting languages have the same text processing abilities as > Perl. You will find this true of Perl's documentation; some of it has not > been updated in quite some time. snip
Are you talking speed or ease of use? Ruby is still pretty slow from what I have heard. And both Ruby and Python are strongly typed, so "50" + 5 is a type error (and "50" + "5" is "505", don't get me started on how stupid it is to overload + to mean concatenation). In terms of ease of use, that is a biggie. It means you have to write casts for just about everything, and since text processing often involves converting strings to numbers and back that is a big roadblock. Also on the ease of use side, Python treats regexes like second class citizens, you must pass a string version of your regex to a method call. That means you must add an extra layer of escapes around things that the string will care about. This makes regexes, which can be hard to understand normally, even harder to understand. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/