[LUAU] language...

Jim Thompson jim at netgate.com
Wed Nov 30 03:13:50 PST 2005



Vince Hoang wrote:

>On Tue, Nov 29, 2005 at 08:10:59AM -1000, Jim Thompson wrote:
>  
>
>>Tim Newsham wrote:
>>
>>    
>>
>>>Yet you make good use of pronouns in your english
>>>compositions. Is it the poor choice of name ($_), the subtle
>>>(or non-uniform?) rules about what they reference, or just
>>>lack of familiarity?
>>>      
>>>
>>Its mostly the last (familiarity), but the non-uniform rules
>>are part of it. Perl's syntax gets in my way, and I openly
>>admit same. It looks like a sendmail.cf file to me.
>>    
>>
>
>Perl's over-dependence on punctuation is admitedly tiring. But,
>would perl suck less if 'use English' and 'use strict' were
>enabled by default?
>  
>
I have no clue.   Likely "use strict" is an improvement, if only for 
orthogonality.

>To be fair, the objectionable perl code I see is due more to the
>style rather than syntax. Take this snippet from logwatch, a
>ubiquitous piece of perl code found on most Linux systems:
>
>  @ServiceList = @TempServiceList;
>  for (my $i = 0; $i <= $#ServiceList; $i++) {
>     $ServiceList[$i] = lc($ServiceList[$i]);
>  }
>
>You could more clearly rewrite it as:
>
>  for my $s (@TempServiceList) {
>    push @ServiceList, lc($s);
>  }
>
>.. or more concisely with:
>
>  @ServiceList = map(lc, @TempServiceList);
>
>.. or in python:
>
>  service_list = [ s.lower() for s in temp_server_list ]
>
>.. or in ruby:
>
>  service_list = temp_server_list.map { |s| s.downcase }
>
>  
>
or lisp

(setq service_list  (mapcar  #'string-downcase TempServiceList))




More information about the LUAU mailing list