Re:Switching from C++ to Rust
by 3836293648 on Tuesday March 14, 2023 @05:18AM
(#35148983)
You clearly haven't tried using variant types properly then. Sure, `std::variant` is pretty unergonomic, but they really are game changing. Most of my types are variant types
[ Parent
| on HN ]
Most of your types? Well that certainly deserves congratulations and I hope someone will take advantage of the opportunity.
I think you misunderstood me though if you say I haven’t used them properly. I just didn’t need them or find them that useful because it rarely happens that I want to model a type which has several states.
Specific variant types like std::optional or the Result-equivalents are useful, but not that game changing either. They’re nice I suppose.
I wonder what kind of software you write that such low-level coding idioms make a big difference to the end result. Or what do you mean by game changing?