Follow

C# has an interesting relationship with references. I'm not sure that auto properties are a good design. I can't reference an auto property, which means I need a backing field if I want to, and that backing field shouldn't be public by convention. This feels like an anti-pattern.

Meanwhile, in languages with more sensible references, I could just have an immutable field. If I wanted to, I could have a list of mutable or immutable references, but not in C#.

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
Anna's Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!