Introduce 'const'ness from C++ #4185
Replies: 3 comments 6 replies
-
Note: |
Beta Was this translation helpful? Give feedback.
-
Shallow immutability is widely supported in C#:
Deep immutability for structs are also supported: The lacking capacity is instance immutability for classes, proposed in #3885 . |
Beta Was this translation helpful? Give feedback.
-
I've long wanted to to see better
However, this isn't allowed, it generates the error:
Needless to say, If you want to get more functional about it I'd settle for using the
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
const in C++ is great for immutability. It would be valuable in C# too.
Beta Was this translation helpful? Give feedback.
All reactions