I regularly write classes which can only have immutable instances, much like string.
I am wondering why Java or C# or VB.NET don't have immutability built-in into the language? That way, I can communicate immutability better to my fellow programmers and also make assumptions about state in the class.
Aucun commentaire:
Enregistrer un commentaire