Primary Constructors: Love them or Hate them?
Primary Constructors: Love them or Hate them?
I think they especially make sense for records so you can easily create shallow modifyable value semantic types with little boilerplate code.
I do hate that all these features are yet more keywords and weird syntax. It’s becoming C##.
Like the records are just sytesized methods on classes or structs. We already have this in the language with source generation. If something there was missing to create records, it would IMO make more sense to improve the source generation so the community also has access to the ecmxtensions. And the record could be split up in it’s separate features (copy constructor, defaul ToString imp, equatable) so we could choose to use part of it.
I do hate that all these features are yet more keywords and weird syntax. It’s becoming C##.
It’s called sharp because you can cut yourself. /s