Searching for the best scripting language,

Cameron Laird claird at
Mon Jun 14 17:57:29 CEST 2004

In article <ouGdnf9c8qBeOlDdRVn-tw at>,
Peter Hansen  <peter at> wrote:
>Ryan Paul wrote:
>> The proof is in the source. This is part of a ruby program I wrote. This
>> snippet is actually a single 'line'. I broke it into several lines for
>> slightly improved readability. This single line would probably take at
>> least 15 lines to do in python, probably more if you wanted to do it
>> intelligently. 
>> ["*.rar.*", "*.r[0-9][0-9].*"].each {|fn|
>>   Dir[$prefix+fn].collect {|x|
>>   x.gsub(/\.\d+[\d.-]*$/,"")}.uniq.each {|x|
>>   `cat #{sesc x}.* > #{sesc x}`} }
>This is proof of something, I'm sure, but for me it's simply another
>indication that (a) Ruby is more like Perl than it is like Python,
>(b) unreadable code can be written in any language, and (c) I
>really don't mind using 15 lines to write something if it means
>the resulting code can readily be understood.
Regular expressions are great.  They're also
limited.  My experience is that it's quite
rare for anything meaningful to an end-user
to find its most natural implementation in 
an RE.

That's what this subthread brings to *my* 
mind.  I recognize that Mr. Paul was doing
"utility programming", not application

Cameron Laird <claird at>

More information about the Python-list mailing list