digitalmars.D.learn - Does D support tail recursion?
- Jerry (5/5) Aug 08 2005 Hi,
- Ben Hinkle (5/11) Aug 08 2005 D the language doesn't say if a given compiler should or shouldn't detec...
Hi, In some ML languages like Ocaml the compiler detects tail-recursions and automatically changes it to a while loop before assembling into machine code. Does D have this tail-recursion-optimization too? -Jerry
Aug 08 2005
"Jerry" <Jerry_member pathlink.com> wrote in message news:dd8dro$7l9$1 digitaldaemon.com...Hi, In some ML languages like Ocaml the compiler detects tail-recursions and automatically changes it to a while loop before assembling into machine code. Does D have this tail-recursion-optimization too? -JerryD the language doesn't say if a given compiler should or shouldn't detect tail recursion. The dmd compiler doesn't. I think the gdc compiler does - but I haven't actually checked.
Aug 08 2005