On Wed, 2012-12-26 at 11:03 -0500, Andrei Alexandrescu wrote: > On 12/26/12 9:42 AM, Russel Winder wrote: […] > > Does D do tail recursion optimisation? > > Yah, but not tail calls. (That should be on the list...)
I'll have to admit confusion from the above statement: tail calls are a programmer technique, tail call optimization is a compiler / run time technique. If a programmer uses tail calls and the compiler realizes tail call optimization then the result is equivalent to iteration. > > Can the D compiler check to enforce *NO* (or at the worst single) > > assignment to a variable? > > Only for immutable data. But isn't that the whole point, in functional programming there is only immutable data. Thus a programming language that allows mutable data cannot really be said to be usable for functional programming style. On the other hand it is 2012-12-26T16:32 and nearly time for fireworks, and drinkies. Hopefully everyone is having a peaceful and happy Solstice/Xmas/New Year/Hogmanay/<insert your personal choice of excuse for celebration>. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:[email protected] 41 Buckmaster Road m: +44 7770 465 077 xmpp: [email protected] London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
signature.asc
Description: This is a digitally signed message part
