Discussion Thread: DIP 1043--Shortened Method Syntax--Final Review
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Tue Jun 28 12:01:37 UTC 2022
On Tuesday, 28 June 2022 at 10:37:08 UTC, welkam wrote:
> Programmers rely on visual patters to understand the code.
> That's why consistent code look is so important.
It isn't ideal to allow this for methods as they are «messages»
to objects and not lambdas. I did use it in Dart, because it was
shorter, but it does make classes look more messy.
It makes more sense for pure free standing functions as they can
be viewed as named lambdas.
I think "=>" should imply `pure` then it would make some sense to
have two notations for the same thing.
More information about the Digitalmars-d
mailing list