Re: skippable arguments in for loops

2005-10-16 Thread Nicholas Clark
On Thu, Sep 29, 2005 at 09:21:40AM -0700, Dave Whipp wrote: Luke Palmer wrote: 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? IMO, it's immediately obvious what it means. Something tells

Re: skippable arguments in for loops

2005-09-29 Thread Dave Whipp
Luke Palmer wrote: 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? IMO, it's immediately obvious what it means. Something tells me that in signature unification, undef means this has to be

Re: skippable arguments in for loops

2005-09-23 Thread Carl Mäsak
I'm not sure we've reached consensus here, so I will try to summarize what everyone said so far in order to clear my own head a bit. :) Sorry in advance if i horribly misrepresent anyone's opinions. Luke: Thinks the _ syntax is no joke, since every language with pattern matching abilities has it.

Re: skippable arguments in for loops

2005-09-23 Thread TSa
HaloO Carl, you wrote: TSa: Prefers to rely on lazy evaluation, and says both tounge-in-cheek and philosophically that if I don't want to care about some elements, I should do so, and let Perl6 optimize. Proposes several ways of not giving a name to a variable. This hits home. And I did at no

skippable arguments in for loops

2005-09-22 Thread Carl Mäsak
hcchien raised the following question on #perl6[1]: If I want to loop through a nine-element array three elements at a time, I do my @a = 1..9; for @a - $x, $y, $z { say $x } But what if I don't care about the elements 1,4,7? Would the following be a sane syntax? my @a = 1..9; for @a - undef,

Re: skippable arguments in for loops

2005-09-22 Thread Luke Palmer
On 9/22/05, Carl Mäsak [EMAIL PROTECTED] 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

Re: skippable arguments in for loops

2005-09-22 Thread David Storrs
On Sep 22, 2005, at 3:08 AM, Luke Palmer wrote: On 9/22/05, Carl Mäsak [EMAIL PROTECTED] 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

Re: skippable arguments in for loops

2005-09-22 Thread TSa
HaloO, Carl Mäsak wrote: But what if I don't care about the elements 1,4,7? Would the following be a sane syntax? my @a = 1..9; for @a - undef, $x, $y { say $x } I think that, if the concept of lazy list evaluation is running deep in Perl 6 than the obvious solution to me is: for @a - $x,

Re: skippable arguments in for loops

2005-09-22 Thread Yuval Kogman
On Thu, Sep 22, 2005 at 07:23:06 -0400, David Storrs wrote: On Sep 22, 2005, at 3:08 AM, Luke Palmer wrote: On 9/22/05, Carl Mäsak [EMAIL PROTECTED] wrote: FWIW, to me it looks fairly intuitive. undef here means don't alias the element, just throw it away... gaal joked about using _