4 ms·
Does the D language have pattern matching?
by amelius 7y ago
Does the D language have pattern matching?
- deleted 7y ago[deleted]
- atilaneves 7y agoNo. But it can be done as a library. Granted, it's not the same as 1st class support, but it's pretty good: https://github.com/pbackus/sumtype https://github.com/pbackus/sumtype