I am curios to know if the trait system helps a lot with mapping the underlying kernel features/quirks? Which language is better at creating abstractions that maps closer to how the kernel works?
Hmm , I’m no kernel writer but I don’t think trait’s necessarily offer anything in rust over C++ where I’d use polymorphism with abstract interfaces.
When I’ve written lower level components the things that have really been godsends outside the safety features are things like enums (much more powerful than C/C++ unions/enums and much more ergonomic than variants).
And even though I said traits don’t offer too much more than C++, one thing I think they do really offer is when combined with generics. Rust generics let you define trait requirements better (though not as extremely flexible) as C++ concepts/constraints.