Re:Google says replacing C/C++ in firmware with Rust is easy
by throwawaymaths on Monday September 09, 2024 @01:22AM
(#41485670)
Rusts generics might wind up adopting constexpr like abilities and also on the docket are keyword generics.
Phantom type looks alien if you haven't used it, but for what it does, it's actually a pretty simple. It's there to explain in Rust's terms what an opaque type or a foreign C/C++ type does. You just need to give Rust an example of an equivalent type, and you get a correct as-if behavior, and you don't need to even know that you've just configured type's variance and destruction order checking.