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

Either you tell your objects what to do, which means they have mutable state, which means you are programming in an imperative way.

Or you get values from your objects. You need getters for this, but you can guarantee immutability and apply functional programming principles to your code.

You can't have your cake and eat it too. At the end of the day, you need values.



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

Search: