| ▲ | zozbot234 5 hours ago |
| You just need to define a trait, then you can use dynamic dispatch. |
|
| ▲ | 9rx 4 hours ago | parent [-] |
| You can, but then you don't get any of what OOP actually offers. Message passing isn't the same thing as dynamic dispatch. OOP is a very different paradigm. |
| |
| ▲ | anonymars 3 hours ago | parent [-] | | I think you are both unknowingly talking past each other: my understanding is that Smalltalk-style "object-oriented programming" ("everything is a message!") is quite distinct from C++/C#/Java/Rust "object-oriented programming" ("my structs have methods!") | | |
|