Hacker News new | ask | show | jobs
by udbhavs 532 days ago
Dart has pattern matching that is a lot more fleshed out than most C-family languages, you should check it out

https://dart.dev/language/patterns

Edit: while there aren’t full ADTs, it does have sealed classes which help with exhaustiveness in matching