develooper Front page | perl.perl6.language | Postings from September 2005

Re: skippable arguments in for loops

Thread Previous | Thread Next
From:
David Storrs
Date:
September 22, 2005 04:23
Subject:
Re: skippable arguments in for loops
Message ID:
297D3BBB-1B88-4766-9BC7-AE9C3F18BFB9@dstorrs.com

On Sep 22, 2005, at 3:08 AM, Luke Palmer wrote:

> On 9/22/05, Carl Mäsak <cmasak@gmail.com> wrote:
>
>> FWIW, to me it looks fairly intuitive. undef here means "don't alias
>> the element, just throw it away"... gaal joked about using _ instead
>> of undef. :)
>>
>
> Joked?  Every other language that has pattern matching signatures that
> I know of (that is, ML family and Prolog) uses _.  Why should we break
> that?

Because the way Carl has it is more consistent with Perl 5, from  
whence most of our users will be coming?  Because 'undef' has a nice  
visual weight, while '_' can all too easily disappear?  Because  
throwing away values is something that we probably shouldn't make too  
easy?

> IMO, it's immediately obvious what it means.

Not IMO.  _ in this context is content-free for me.

But, whatever.  I'm sure it will end up being _ if this feature is  
added.

--Dks
Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About