3 ms·
I feel associating methods to data is very good in terms of reducing scope (avoids every function being global) and developer convenience. But when people glor
by BobbyTables2 2y ago
I feel associating methods to data is very good in terms of reducing scope (avoids every function being global) and developer convenience.
But when people glorify OOP, they are usually focused on highlighting polymorphism — and that is when the “king has no clothes”.
Outside somewhat narrow usecases, polymorphism is often overrated. Even when functionally possible in OOP, there could be huge performance impacts of a simple change like changing an array to linked list.
The “traits” approach used in Rust (and others) is much more practical.