3 ms·
No! - Parametric polymorpism isn't OOP, pretty much every halfway-decent language has it (including Haskell, which is as functional as they come). - Boxing in
by anaphylactic 8y ago
No!
- Parametric polymorpism isn't OOP, pretty much every halfway-decent language has it (including Haskell, which is as functional as they come).
- Boxing in Rust isn't what you think it is - it's just heap allocation (more like malloc than the monstrosity that is boxing in Java).
- Again, operator overloading isn't OOP either. Seriously, is it that hard to believe that "you get to use + and - with your own types" is an expectation independent of any paradigm?
> I must have gotten the wrong idea.
Yes. Go and Rust are both very far from what most people would consider "OOP".
- kristoff_it 8y agoYou make it sound like OOP is an inherently bad thing, and OOP is not mutually esclusive with FP as you seem to imply with your Haskell reference. Funcional can be considered an alternative vs imperative and declarative, and usually languages are a mix of the three. And any of these 3 style can support OOP. BTW, plenty of half-decent languages don't have generics.
- rs86 8y agoObjects are parametrizations of functions that possibly close over variables. Having types with functions defined in types with dot notation is a different thing.