Re:Comparing Parallel Rust and C++
by lenkite on Friday November 08, 2019 @08:32AM
(#21481988)
You have std::variant and std::visit. https://www.bfilipek.com/2018/09/visit-variants.html
Or you can use a library: https://github.com/mpark/patterns
[ Parent
| on HN ]
> You have std::variant and std::visit. https://www.bfilipek.com/2018/09/visit-variants.html
Which isn't a true sum type because it doesn't nest properly.
> Or you can use a library: https://github.com/mpark/patterns
Interesting; proper pattern-matching is nice, but the lack of type safety is still a major issue.