4 ms·
Linux devs are working to support Rust, which is a lot cleaner than C++ (essentially, no implementation inheritance) and has more straightforward interfacing wi
by zozbot234 5y ago
Linux devs are working to support Rust, which is a lot cleaner than C++ (essentially, no implementation inheritance) and has more straightforward interfacing with C components.
- StillBored 5y agoSelective implementation inheritance is actually quite useful for kernel/driver development if its used where function pointers in C tend to be used. Pluggable interfaces. It standardizes the syntax, provides default implementations, and forces implementation of mandatory methods. C++ when used as a better C, really is better.
- zozbot234 5y agoPluggable interfaces are ok, and Rust supports them just fine via traits. Actual implementation inheritance is inherently anti-modular.
- jjoonathan 5y agoI'm not convinced that "no inheritance" is better -- drivers seem to be one place where it's actually put to good use -- but I also don't think it really matters that much. In contrast, Rust definitely has fewer foot-guns, and that matters a lot. Of course, the OSX driver code is going on 25 years old, so it's not evidence of anyone's opinion that C++ beats Rust for OS dev.