Re:Switching from C++ to Rust
by tomjakubowski on Monday March 13, 2023 @08:05PM
(#35145212)
In fairness to C++, you could derive a class from std::variant and add methods to it that way.
It's less awkward with Rust's enums for sure though. And pattern matching as in Rust is far more expressive (and legible) than what std::variant gives you.
It's less awkward with Rust's enums for sure though. And pattern matching as in Rust is far more expressive (and legible) than what std::variant gives you.