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

There's nothing wrong with state. State is a fact of life in programming. Even pure functional program has states, which are the parameters passed among functions.

I guess you meant mutable state. You don't have to use mutable state with OOP - just create a class that allows state initialization in the constructors but nothing else, with none of the methods changing the states.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: