On 2015-04-21 17:36, Jadbox wrote:
What's the best equivalent to Rust's structural enum/pattern (match)ing?
Is it also possible to enforce exhaustive matches? Basically, I'm
curious on what the best way to do ADTs in D.

There's something call "castSwitch" [1], perhaps not what you're looking for.

[1] http://dlang.org/phobos/std_algorithm_comparison.html#.castSwitch

--
/Jacob Carlborg

Reply via email to