On Mon, 19 Dec 2011 17:17:43 +0100, clk <c...@clksoft.com> wrote:
Hello, I'm new to this mailing list. I'm trying to learn D to eventually use it in production code. I'm a little bit intimidated by the fact that the topics in the d-learn list look rather advanced to a newbie like me. I have 3 fairly simple questions: 1) Does D support something like the javascript 1.8 destructuring assigment (multiple assigment in python): [a, b] = [b, a];
This, or something quite like it, was covered on Saturday in the thread "Alias/Ref Tuples ?". This works (but is hardly as elegant as Python's syntax: import std.typetuple : TypeTuple; import std.typecons : tuple; TypeTuple!(a, b) = tuple(b,a);