Destructured Tuple Assignment
via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri May 15 04:04:23 PDT 2015
On Friday, 15 May 2015 at 10:46:32 UTC, Per Nordlöw wrote:
> Can this be solved with a mixin somehow?
To clarify, I want to be able to write
let(first, _, second) = expression.findSplit(separator);
without having to first declare `first`, `_` and `second`.
I'm guessing the closest thing we can get in current D version is
something like
let(q{first, _, second},
expression.findSplit(separator));
right?
Which might be good enough for now.
More information about the Digitalmars-d-learn
mailing list