4 ms·
> You yourself said above, that it's hard. I said modeling single inheritance is hard. That's a very niche use case; basically only crops up when writing an in
by Manishearth 11y ago
> You yourself said above, that it's hard.
I said modeling single inheritance is hard. That's a very niche use case; basically only crops up when writing an interpreter for a language with single inheritance (and in cases like Servo's DOM)
> unless you know how to do it already, coming up with such approaches isn't something that one who just learns the language would be focusing on
Again, it's not a thing that you do as a drop-in for inheritance. I'm saying that the regular approach (i.e. using traits and enums idiomatically) to designing your application in Rust will cover the use cases for inheritance, differently.
Basically, don't try to write Rust code as if it's C++ or Java and stuff should work out.
- shmerl 11y agoI don't mean one has to copy ideas from C++ or Java to Rust verbatim, but having some explanation on how to use Rust OOP abstractions for solving common programming problems would be useful. I don't think current Rust documentation covers that well.
- Manishearth 11y agoAh, fair.