DIP1001: DoExpression

Cauterite via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 3 09:19:21 PDT 2016


On Saturday, 3 September 2016 at 15:28:36 UTC, Andrei 
Alexandrescu wrote:
> What's wrong with:
>
> auto seq(T...)(auto ref T vals) { return vals[$ - 1]; }

Well there's nothing *wrong* with that, but I really think that 
'do' is the perfect word for this purpose, and the fact that it's 
already a keyword is real convenient. For just 10 lines in 
parse.d we get this great syntax, no code breakage, no need to 
copy-paste a little template around.


More information about the Digitalmars-d mailing list