--- John Nagle <[EMAIL PROTECTED]> wrote:
> 
>     There's a real reason.  Remember, functions are
> dynamically
> replaceable.  The compiler would have to detect that
> the function
> doesn't modify or replace itself while recursing for
> this optimization
> to be valid.  Worst case, another thread could
> replace the function
> while it was recursing, invalidating the tail
> recursion optimization.
> 

You would just change the language definition to say
that once you enter f(), any call to f() from within
f() behaves as if the recursively called f() still
points to the originally bound version of f.  To want
any other behavior would be absurd, anyhow. 

I could see the utility of this restriction even
without optimization.
 


       
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to