Hacker News new | past | comments | ask | show | jobs | submit login

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: