2 ms·
State can also be shared and reused together with functions operating on it - via composition.
by jupp0r 3y ago
State can also be shared and reused together with functions operating on it - via composition.
- Kamq 3y agoSure, 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.
- jupp0r 3y agoAgreed, 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.
- vaughan 3y agoOO 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.