Searching for the best scripting language,

Cameron Laird claird at lairds.com
Mon Jun 14 11:57:29 EDT 2004


In article <ouGdnf9c8qBeOlDdRVn-tw at powergate.ca>,
Peter Hansen  <peter at engcorp.com> 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
development.
-- 

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



More information about the Python-list mailing list