digitalmars.D.learn - Extent of tail call optimization in D?
- J. Jenkins (10/10) Nov 13 2012 In Dr Alexandrescu's "The D Programming Language", on page 12, it
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. cont(things); } Is the call `cont(things)' optimized?
Nov 13 2012