Re: Formal Parameters To While Block

2005-05-02 Thread Larry Wall
On Sat, Apr 30, 2005 at 08:24:14PM -0600, Luke Palmer wrote: : Yeah, "is lazy" should be fine for now. The feature is definitely : there, but it might end up being called something different. "is : braceless"? I think "is braceless" is better, if only because it's longer. Though I still suspect

Re: Formal Parameters To While Block

2005-05-02 Thread Larry Wall
On Sat, Apr 30, 2005 at 10:06:32AM -0600, Luke Palmer wrote: : Aaron Sherman writes: : > On Tue, 2005-04-26 at 09:37 -0600, Luke Palmer wrote: : > : > > We're thinking at the moment that `while` will probably look like this: : > > : > > sub statement: (&cond is lazy, &block) { : > [...] : >

Re: Formal Parameters To While Block

2005-05-01 Thread Brent 'Dax' Royal-Gordon
On 5/1/05, Luke Palmer <[EMAIL PROTECTED]> wrote: > Anyway, "for" doesn't need "is lazy", because it simply evaluates the > list it is given and iterates over it. The fact that evaluating the > list may be a no-op because of laziness is unrelated to "is lazy" > (another hint that it's the wrong na

Re: Formal Parameters To While Block

2005-05-01 Thread Luke Palmer
Juerd writes: > Luke Palmer skribis 2005-05-01 1:17 (-0600): > > Umm... maybe I'm totally misunderstanding you, but I think it doesn't, > > since I'm implementing statement:, not statement:. > > Sorry, I wasn't clear enough. How would the same "is lazy" thing be > useful with "for", given this ex

Re: Formal Parameters To While Block

2005-05-01 Thread Juerd
Luke Palmer skribis 2005-05-01 1:17 (-0600): > Umm... maybe I'm totally misunderstanding you, but I think it doesn't, > since I'm implementing statement:, not statement:. Sorry, I wasn't clear enough. How would the same "is lazy" thing be useful with "for", given this example? Juerd -- http://

Re: Formal Parameters To While Block

2005-05-01 Thread Luke Palmer
Juerd writes: > Luke Palmer skribis 2005-04-26 9:37 (-0600): > > sub statement: (&cond is lazy, &block) { > > How does that handle > > for { closure }, { closure } -> { ... } > > and why? :) Umm... maybe I'm totally misunderstanding you, but I think it doesn't, since I'm implementing s

Re: Formal Parameters To While Block

2005-05-01 Thread Juerd
Luke Palmer skribis 2005-04-26 9:37 (-0600): > sub statement: (&cond is lazy, &block) { How does that handle for { closure }, { closure } -> { ... } and why? :) Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http://convolution.nl/gaji

Re: Formal Parameters To While Block

2005-04-30 Thread Luke Palmer
Autrijus Tang writes: > On Tue, Apr 26, 2005 at 09:37:51AM -0600, Luke Palmer wrote: > > Joshua Gatcomb writes: > > > The solution is formal parameters. The trouble is I > > > can't seem to find a good example in S04 that matches > > > what I am trying to do. > > > > > > while $ref() -> @array {

Re: Formal Parameters To While Block

2005-04-30 Thread Autrijus Tang
On Tue, Apr 26, 2005 at 09:37:51AM -0600, Luke Palmer wrote: > Joshua Gatcomb writes: > > The solution is formal parameters. The trouble is I > > can't seem to find a good example in S04 that matches > > what I am trying to do. > > > > while $ref() -> @array { ... } > > We're thinking at the mom

Re: Formal Parameters To While Block

2005-04-30 Thread Luke Palmer
Aaron Sherman writes: > On Tue, 2005-04-26 at 09:37 -0600, Luke Palmer wrote: > > > We're thinking at the moment that `while` will probably look like this: > > > > sub statement: (&cond is lazy, &block) { > [...] > > Just curious, why a sub and not a macro? Didn't need a macro. statement:

Re: Formal Parameters To While Block

2005-04-30 Thread Aaron Sherman
On Tue, 2005-04-26 at 09:37 -0600, Luke Palmer wrote: > We're thinking at the moment that `while` will probably look like this: > > sub statement: (&cond is lazy, &block) { [...] Just curious, why a sub and not a macro? > That does pose a problem with: > > given $foo { > until

Formal Parameters To While Block

2005-04-26 Thread Joshua Gatcomb
All: Please forgive me, but I have only recently started following the language side of p6 after spending a fair amount of time with Parrot. Last night I installed Pugs and wrote my first p6 code: http://perlmonks.org/index.pl?node_id=451398 Reading S04, it seems that there are no implicit block

Re: Formal Parameters To While Block

2005-04-26 Thread Luke Palmer
Joshua Gatcomb writes: > The solution is formal parameters. The trouble is I > can't seem to find a good example in S04 that matches > what I am trying to do. > > while $ref() -> @array { ... } We're thinking at the moment that `while` will probably look like this: sub statement: (&cond is

Formal Parameters To While Block

2005-04-26 Thread Joshua Gatcomb
All: Please forgive me, but I have only recently started following the language side of p6 after spending a fair amount of time with Parrot. Last night I installed Pugs and wrote my first p6 code: http://perlmonks.org/index.pl?node_id=451398 Reading S04, it seems that there are no implicit blo