Aren't records and init only setters in C# also a way to favor immutable types and fix setters in properties? (Not trying to criticize, I really want to know).
With the Builder pattern, you can easily define complex relationships for your class inner state. Like maybe if A & B are specified, then C shouldn't be specified. But if C is specified, then D should have a default value. Etc.
These types of initialization requirements are not easily duplicated with C# init-only construction. Instead, in C# you have to rely on the callers to know exactly how to correctly instantiate your class, including all the complex logic like in the example above.
So yes, C# init-only setters are kind of the best option you have. You can still create a C# FooBuilder for a Foo class. But generally C# programmers want to go out of their way to directly instantiate a Foo, and the number of bugs you get from this is crazy. It's a culture thing, honestly, not as much a language problem.
No, it is not. And nothing about this seems to violate the guidelines [0].
In fact, I'd say fits pretty well with the 'on topic' part of the 'what to submit' section.
"I want outrage" is neither interesting nor stimulating, and there are already plenty of sites to go to for that. There's no need to turn HN into another one.
The impulsive, child like, revengeful, behavior of the Tesla CEO, is highly relevant for the general audience below. Very likely to be a non negligible part of this site readers:
- VCs
- Tesla Shareholders
- Tesla Owners
- Twitter Employees
- SpaceX Employees
- General analysts of what really makes for the success
of Tech Companies. The presence of the CEO or it's
thankful leave of absence at the controls.
- General admirers of human imperfections
- Promoters of AI has a better deserving custodian of the Planet
- Remote bored Aliens, with a lifespan of 50,000 years,
and a curated HN feed, laughing their 4 mouths off
out of our primitive illogical egos.
Sorry but that makes no sense.
Here are quotes from the C#/.NET group director at unity about how the migration to CoreCLR should bring a large perf boost:
"One thing that should help in the future is the migration to CoreCLR that should provide a great boost in terms of performance."[1]
"What we have seen, outside of Unity, is that performance with CoreCLR compared to Mono should range from 2x to 10x faster." [2]
Because unity is not yet on CoreCLR. But unity shouldn‘t be much different to other applications. Jetbrains moved Rider only a few years ago to .NET Core, and everything became much snappier (it was on on .NET 4.x on windows and on mono for Linux/Mac before, which was even slower than the windows only full framework)