Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not sure about Dart, but for C# I don't think it can (due to classes being open by default).

If anyone is interested in a deeper dive on C# and adding Discriminated Unions, this interview by Nick Chapsas with Mads Torgersen is a great discussion: https://youtu.be/Nuw3afaXLUc?t=3939 (note, I'm pretty sure this time stamp is the right part, but the discussion might start before this. I'm at work and can't listen too closely to the video atm).



After re-watching, exhaustiveness is not a feature yet. If you look above to munificent's comment, you'll see that Dart has it! very cool!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: