Is Perl *that* good?

Cameron Laird claird at lairds.com
Wed Apr 28 07:59:03 EDT 2004


In article <XwEjc.31513$Vp5.16074 at fe2.columbus.rr.com>,
Carl Banks  <imbosol at aerojockey.invalid> wrote:
			.
			.
			.
>If you do stuff recursively (as I often do) or break up code into
>smaller functions (as I often do) so that the functions with these
>regexps get called numerous times, it can help performance to move the
>compile step out of the functions.
>
>The point is, the existence re.compile encourages people to make
>regexp objects global so they only need to be compiled once, when the
>module is loaded.  Because of this, and especially because regexps are
>prone to being used in recursive functions and such, it's dangerous to
>allow them to have state.
			.
			.
			.
I wrote the subject line for this subthread.  Here's
my provisional conclusion:  my past attempts to track
down claims of the "Perl is tops for string-handling"
sort generally reinforced the proposition that the
speaker simply meant, "Perl privileges REs" (and that
the speaker had no familiarity with Python, let alone
Icon or Prolog).  Now I see there's a likelihood of
definite attraction to the hidden-variable, dangerous
implicitness goop so characteristic of Perl.  That's
good to understand.  Thanks, Carl; good analysis.
-- 

Cameron Laird <claird at phaseit.net>
Business:  http://www.Phaseit.net



More information about the Python-list mailing list