Deprecate {} without () for function pointers and delegates
Dmitry Olshansky
dmitry.olsh at gmail.com
Mon Jun 15 07:46:41 UTC 2026
On Friday, 12 June 2026 at 21:07:49 UTC, ABrightLight wrote:
>
> Anyway, I'd rather not have to juggle these questions in my
> mind, and a simple solution would be to deprecate function
> literals that omit the parentheses for the parameter list.
> Having to type an extra 2 characters is well worth not having
> to think about the edge cases.
For me in Photon that would be the difference between
go({ block of code });
and
go((){ block of code });
Gnarly syntax reminding of c++ lambdas. While currenly it looks
almost as simple as Go lang.
> Thank you
More information about the Digitalmars-d
mailing list