2 ms·
How about this non-contrived example: Certain data types (Array, Java.util.Date) expose private information if you just blindly return your instance variable t
by coredog64 9y ago
How about this non-contrived example:
Certain data types (Array, Java.util.Date) expose private information if you just blindly return your instance variable to the caller. Setting can be dumb, but you may want to create a defensive copy to hand back on get.
C# syntactic sugar makes that apparent to the reader.