4 ms·
So, you’ve been arguing for using switch statements, instead of Clean Code’s suggestion of using object-oriented polymorphism, in a context where polymorphism d
by laserlight 4y ago
So, you’ve been arguing for using switch statements, instead of Clean Code’s suggestion of using object-oriented polymorphism, in a context where polymorphism doesn’t exist?
- pkolaczk 4y agoNot at all. Not having classes is not the same as not having polymorphism. Rust supports polymorphism just fine (and one could argue its support for polymorphism is actually much more advanced than that of Java's; but that's not enough reason to use it everywhere).
- whstl 4y agoThe greatest trick OOP ever pulled was convincing the world that polymorphism didn't exist outside OOP.