Extend D's switch statement?

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Thu Jul 9 09:08:36 PDT 2015


On 07/09/2015 04:17 PM, Timon Gehr wrote:
> On 07/09/2015 02:54 PM, rsw0x wrote:
>> ...
>> someone was willing to produce.
>
> Someone is often willing to produce awkward language quirks, so I think
> being critical of new additions has some value.

E.g.

"Note: Cannot swap values by tuple assignment.

int x = 1, y = 2;
{x, y} = {y, x};
// Lowered to:
// x = y, y = x;
assert(y == 2);
assert(x == 2);"

No, please.


More information about the Digitalmars-d mailing list