proposal: short => rewrite for function declarations
Adam D. Ruppe
destructionator at gmail.com
Sun Oct 11 13:50:25 UTC 2020
On Saturday, 10 October 2020 at 20:43:55 UTC, Steven
Schveighoffer wrote:
> 1. is short for:
> (T)(T v) {
> return v.foo;
> }
This technically isn't true... the lambda expression actually
does context-dependent magic that this template can't represent
either.
Like that is *part* of its implementation detail, but there's
more to it.
So since it is indeed impossible to duplicate its
context-dependent magic, I made it a parse error:
https://github.com/dlang/dmd/pull/11833/commits/acd15ce776af9bab336c14df20d77fbdc708e368
should be a happy enough compromise.
More information about the Digitalmars-d
mailing list