Re:How I went about learning Rust
by dllthomas on Friday July 15, 2022 @09:11AM
(#32107793)
It's similar, but there are some differences. Notably, my package can implement my trait for your type, while my package (usually? always?) cannot make your type inherit from my virtual base class.
[ Parent
| on HN ]
Depends on the flexibitly of the language, there isn't a golden way to do that across all variations of OOP.
Wrapper classes should be equally good once Valhalla (jdk) lands, without introducing another pointer indirection.