|
|
|
|
|
by loup-vaillant
1606 days ago
|
|
> It's very rare, however, that I see someone do the wrong thing because someone told them it was the right thing (at least in the programming field). > any specific examples of worst practices explicitly being disseminated under the guise of best practices? OOP. The actor model envisioned by Alan Kay was promising, but the brand we saw in Java and C++ in the late 90's and early naughties was pretty bad. There's a reason we moved away from inheritance in favour of composition, a reason why OOP languages took a clue from statically typed FP languages and grew generics 20 years later than them, a reason why they eventually grew first class functions… and don't get me started on performance sensitive software which could have benefited from a bit of data orientation. Don't get me wrong, classes have their uses. Grouping related data together is very handy, as well as the namespacing. And sometimes, even inheritance has its uses. But as a whole it's just the wrong way to look at things. A program's job is to move & transform data, and instead of focusing on that data OOP encourages you to think of an inevitably contrived model of the world. |
|