Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's somehow unbelievable how long this getter/setter convention has been used (at least?) in java - People mindlessly generating them with their IDE - and nobody cared to question it and/or think of a better way before.

Not sure if "they are OO" (and what's the point?), but I think getters and setters usually are not needed and only add a lot of useless boilerplate code. Maybe in your boss's eyes it might look like you've been writing a lot of code. :)

But of course sometimes they are useful, and those times I think python's approach would be a better way. Maybe some other languages have even better ways to accomplish this?



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

Search: