Discussion Thread: DIP 1043--Shortened Method Syntax--Final Review
bauss
jj_1337 at live.dk
Tue Jun 28 12:05:22 UTC 2022
On Tuesday, 28 June 2022 at 12:01:37 UTC, Ola Fosheim Grøstad
wrote:
> 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.
It makes a lot of sense for properties too, in classes as well.
More information about the Digitalmars-d
mailing list