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

> The OOP model fits nicely into most people’s heads because of the analogy to the real world

It also has been the default programing language paradigm for a while now, which I think explains why experienced programmers can cling to it despite its drawbacks. Try to teach object oriented programming to a beginner and it becomes clear that it isn't as natural as you are suggesting.

> generally seem to give better signals when you are doing something wrong.

Better than what? Functional programming is a far simpler abstraction: a function. Data in, data out. That's about as simple as it gets. Also, culturally, functional programmers generally understand the downside of distributed state, and actively try to minimize it. That's a good thing.

Bad code is bad code, but OOP gives you unique weapons to hurt yourself with. Inheritance allows one to change an unbounded number of objects without you even knowing. Modeling everything as a collection of objects with state tends to lead to programs that need to synchronize distributed state rather than a central state that is easier to keep consistent.



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

Search: