Dan Sugalski <[EMAIL PROTECTED]> writes:

> At 11:45 PM +0100 4/5/02, Piers Cawley wrote:
>>So, here I am working on a Scheme interpreter in Perl 6, and I'm
>>trying to write it in a (for want of a better description)
>>'Scheme-like' fashion with lots of recursion.
>>
>>The trouble is, unless Perl6 is going to be guaranteed to do
>>optimization of tail calls, this is going to lead to horribly slow
>>code. So, do I bite the bullet and recast some of the functions in an
>>iterative vein, or do I trust that Perl6 will do tail call optimization?
>
> If you don't mind emitting bytecode directly, Parrot's calling
> conventions are such that tail calls and tail recursion works OK.

I know. When I do the parrot version of this I'm going to be taking
every advantage of it. (Once I've worked out how to detect that I'm
about to make a tail call).

-- 
Piers

   "It is a truth universally acknowledged that a language in
    possession of a rich syntax must be in need of a rewrite."
         -- Jane Austen?

Reply via email to