August 08, 2005
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


August 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?
>
> -Jerry

D 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.