Python has tuple assignment so you see things like:
previous, current = current, previous + current
especially if you are doing silly things like calculating Fibonacci
Sequence values. Translating this to D, you end up with:
TypeTuple!(current, next) = tuple(next , current +next);
I am assuming this is horrendously inefficient at run time compared to
having the intermediate value explicit:
auto t = next;
next = current + next;
current = t;
or is it?
--
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
