Dan Sugalski <[EMAIL PROTECTED]> writes:

> On Thu, 2 Oct 2003, Mark A. Biggar wrote:
>
>> Austin Hastings wrote:
>
>> > But that imposes <C>eval()</C> pretty frequently. Better to provide
>> > some lower-level hackish way to agglutinate Blocks.
>>
>>
>> Isn't this one of the prime examples of why CPS is being use, it allows
>> for Tail Recursion Optimization.  With TRO all your worries about
>> overhead do to the wrap go away.
>
> This isn't why CPS is being used under the hood. (Nothing in perl 6
> propmted CPS) I wouldn't necessarily count on being able to do tail calls
> here either, as they potentially alter the semantics, or at least the
> introspectable environment, of the program as they make frames go away.

I'm vaguely hoping that modules will be able to declare that they
don't need to access a 'strict' caller and that they'll be happy
with a return from caller that skips any tail calls. Then, if the
Perl 6 compiler sees that all modules in play have declared
themselves in this fashion it'll use optimized tail calls. However,
thinking about that I'm not entirely sure how it could be done with a
single pass compiler.

Reply via email to