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

State can also be shared and reused together with functions operating on it - via composition.


Sure, but that's desirable with, maybe, 5% of the code re-use opportunities I run across.

I'm not saying to never use classes. I just got really confused about them being pushed as one of the dominant forms of code-reuse.


Agreed, I think it's been a hype at the beginning of OOP, then got overused in Java in the 90s and subsequently taught to every CS college student and it kind of stuck because in college, you don't get to maintain large software projects.


OO is the king of the contrived example

    const dog = new Dog
    dog.woof()
Now you see how simple OO is, let's build banking software.




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

Search: