DIP 1043---Shortened Method Syntax---Accepted

Doigt labog at outlook.com
Thu Sep 22 01:28:11 UTC 2022


On Wednesday, 21 September 2022 at 10:39:27 UTC, Mike Parker 
wrote:
>>For example:
>>
>>     T front() => from;
>>
>>becomes:
>>
>>     T front => from;
>
> As DIP author, Max decided against this. He said it's not a bad 
> idea, but it's then "inconsistent with other the other 
> syntaxes". If there is a demand for this, it would be easy to 
> add later, but he felt it's better to keep things simple for 
> now by going with the current implementation as is.

It's one of those things that aren't necessary, but bring some 
small "quality of life" kind of change to the code we write. At 
least in my opinion, I quite like it, the same way I like how I 
can call a parameter-less function without parentheses.


More information about the Digitalmars-d-announce mailing list