www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Extent of tail call optimization in D?

In Dr Alexandrescu's "The D Programming Language", on page 12, it 
is noted that the D compiler will rewrite tail calls within a 
procedure as loops.  Does the compiler rewrite tail calls between 
procedures as jumps?

For example, in pseudo-D:

void foo(K)(K cont, stuff..) {
     // Do things with stuff.

Is the call `cont(things)' optimized?
Nov 13 2012