Discussion Thread: DIP 1043--Shortened Method Syntax--Community Review Round 1
Max Samukha
maxsamukha at gmail.com
Wed Feb 9 12:52:16 UTC 2022
On Wednesday, 9 February 2022 at 12:38:56 UTC, bauss wrote:
>
> And it also only looks wrong to you because you think of "N =>
> N" being an expression only, BUT in this case it's not supposed
> to be an expression. It's supposed to be a shortened method
> syntax. So arguably any function statement should be valid
> after the "=>" and it indeed should be an "edge-case" for the
> "=>" operator.
Actually, if any type implicitly converted to the unit type, it
would probably look pretty good to me. Not going to ever happen
in D, though.
More information about the Digitalmars-d
mailing list