Please support shorter constructor init

Danilo Krahn anon at dlang.de
Sat Jul 8 15:33:34 UTC 2023


On Saturday, 8 July 2023 at 14:52:34 UTC, ryuukk_ wrote:
>
> Constructor on structs?
>
> Vectors as classes with inheritance?
>
> Sorry, but this is just bad advice that nobody should follow

This has nothing to do with "Vector" or "inheritance".

It's about repeating constructor initialization.

Modern languages support direct init using `this` and `super` 
inside the
parameters, so repeating `this.x = x` is not neccessary.

https://dart.dev/language#classes



More information about the Digitalmars-d mailing list