Why I don’t like init;

Ok. It’s not that I don’t like but wanted to have a short title.
immutability but not explicit. It’s not clear what properties are expected to be initialized unless you go through each member of a class. If you used constructor it could have been guaranteed that state is initialised as it has to be. You are having an immutability but property based not instance based. Which is not sufficient. records are nice but it makes entire instance immutable.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments