On Friday, 15 May 2015 at 10:23:24 UTC, Per Nordlöw wrote:
I recall having seen an example of using some D magic (via
mixin perhaps?) to realize tuple destructuring in assignments
like
magic(first, _, second) = expression.findSplit(separator);
somewhere. But I can't seem to find it right now.
References anyone?
BTW :I'm aware of Kenjis PR, which I am very much longing for ;)
Well there's always this, which is a bit ugly:
typeof(expression) first, _, second;
TypeTuple!(first, _, second) = expression.findSplit(separator);
But of course the holy grail is being able to declare variables
inline.