Proposal: Object/?? Destruction
jmh530
john.michael.hall at gmail.com
Thu Oct 5 15:48:55 UTC 2017
On Thursday, 5 October 2017 at 06:42:14 UTC, Timon Gehr wrote:
>
> Why curly braces? Multiple function arguments are a form of
> built-in tuple, so the syntax should be consistent:
>
> auto (success, message) = callVoldemortFunction();
>
> The only unresolved question is (as using the result of the
> comma operator has been deprecated already): How to write a
> unary tuple. My favourite is what python does: "(3,)". This is
> however already accepted as a function argument list. I think
> it is worth breaking though. Maybe we should deprecate it.
The curly bracket syntax looks straight out of DIP 32
https://wiki.dlang.org/DIP32
auto {x, y} = {1, "hi"};.
More information about the Digitalmars-d
mailing list