DIP: Tail call optimization
bachmeier via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Mon Jul 11 05:56:36 PDT 2016
On Sunday, 10 July 2016 at 05:03:46 UTC, Dietrich Daroch wrote:
> Hi everyone (=
>
> I've just added a new proposal to add a new attribute to ensure
> TCO is applied.
>
> The proposal is really simple, but I'm clueless on how to
> implement it and also interested on getting feedback on it.
>
>
> The proposal it's ready for merge on the new [DIPs
> repo](https://github.com/dlang/DIPs/pull/6)
>
> --
> Dietrich
Would something like Clojure's recur and trampoline do what you
want?
http://www.clojure.org/about/functional_programming#_recursive_looping
A number of Common Lisp programmers like to use those functions
because TCO is then guaranteed, and unlike Common Lisp where you
don't know for sure what will happen, it is explicit.
More information about the Digitalmars-d-announce
mailing list