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:while (cond is lazy, block) { : [...] : :

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 it's

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:while (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

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:while, not statement:for. Sorry, I wasn't clear enough. How would the same is lazy thing be useful with for, given this example? Juerd --

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:while, not statement:for. Sorry, I wasn't clear enough. How would the same is lazy thing be useful with for, given this

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 name). To

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:while (cond is lazy, block) { [...] Just curious, why a sub and not a macro? That does pose a problem with: given $foo { until

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:while (cond is lazy, block) { [...] Just curious, why a sub and not a macro? Didn't need a macro. statement:while

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 moment that

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 { ... } We're

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:while (cond is