Re: lazy context

2005-05-23 Thread TSa (Thomas Sandlaß)
Yuval Kogman wrote: The only "builtin" feature that needs to be added is that coroutines can masquerade as their return value, and not a code reference, but AFAIK proxy objects will give us that anyway, right? Hmm, isn't the same achieved by considering Eager and Lazy as subtypes of Code? E.g.

Re: lazy context

2005-05-23 Thread Ingo Blechschmidt
Hi, Yuval Kogman woobling.org> writes: > we have a lazy modifier: > > my $a = lazy { get_value(5, 10) }; as of r3739 implemented in Pugs. :) > The only "builtin" feature that needs to be added is that coroutines > can masquerade as their return value, and not a code reference, but

Re: lazy context

2005-05-20 Thread Yuval Kogman
On Fri, May 20, 2005 at 17:15:24 -0400, C. Scott Ananian wrote: > This is very elegant. It might be worthwhile for someone to attempt to > define a 'core > perl' set of operators, etc, so that the 'rest of perl' can be defined in > perl proper... Have a look at synopsis 29... For documentatio

Re: lazy context

2005-05-20 Thread Patrick R. Michaud
On Fri, May 20, 2005 at 05:15:24PM -0400, C. Scott Ananian wrote: > On Fri, 20 May 2005, Yuval Kogman wrote: > > >then it is not finalized into a real value. Here's how the range > >operator would be implemented: > > > > sub &infix:<..> ($from, $to where { $to < $from }){ reverse $to .. > >

Re: lazy context

2005-05-20 Thread C. Scott Ananian
On Fri, 20 May 2005, Yuval Kogman wrote: then it is not finalized into a real value. Here's how the range operator would be implemented: sub &infix:<..> ($from, $to where { $to < $from }){ reverse $to .. $from } sub &infix:<..> ($from, $to) { lazy gather { while ($f