Re:C#'s Greatest Mistakes by Jon Skeet
by AndrewDucker on Sunday November 28, 2010 @06:43AM
(#1947178)
The automated property generators are just syntactic sugar. At the moment, if I want a property that's settable inside and out I can can type:
In order to do the same with an immutable property requires a fair bit more code.
Replacing all of that with
would be handy, and work with the way the language currently does.
[ Parent
| on HN ]
[deleted]
Re:C#'s Greatest Mistakes by Jon Skeet
by AndrewDucker on Sunday November 28, 2010 @07:11AM
(#1947209)
Oh, absolutely. It's not vital - it's just that with there being more multithreaded stuff going on I'd like easier ways of making it clear what's immutable and what isn't.
Heck, I'd love a way of saying "immutable class" in the same way you can with a "static class", just to ensure I haven't missed anything!
Re:C#'s Greatest Mistakes by Jon Skeet
by adambyrtek on Sunday November 28, 2010 @07:18AM
(#1947217)
I deleted my previous comment shortly after posting because I realized that you're right, this would be definitely useful. I haven't noticed that you already managed to reply to it.