2 ms·
Rust stdlib code is a lot nicer to read than C++ stdlib code, which relies on _Mangled names to prevent conflicts, and (ab)uses template metaprogramming, SFINAE
by nyanpasu64 6y ago
Rust stdlib code is a lot nicer to read than C++ stdlib code, which relies on _Mangled names to prevent conflicts, and (ab)uses template metaprogramming, SFINAE, overloading, & and && and forwarding, etc. heavily. Though Rust's trait system results in indirections comparable to (but somewhat more manageable than) C++ SFINAE/overloading/type traits. And some Rust stdlib types delegate to compiler intrinsics rather than being implemented in unsafe Rust (forgot which).
Additionally, third-party Rust data structure/concurrency crates often contain unsafe code comparable to Rust's stdlib in complexity. (And device drivers, as you mentioned, are probably highly unsafe too.)