3 ms·
Why Nullable Types?
- munificent 6y agoAuthor here. The article is nominally about Dart, but really it should be useful to anyone wondering about the different approaches languages taking to representing the absence of values. I've seen a lot of questions and confusion over the past couple of years between option types (Scala, Swift, Haskell, Rust) and nullable types (Kotlin, TypeScript, Dart). This article is my attempt to try to show the similarities, differences, and trade-offs between those two approaches.
- markdog12 6y agoAs always, nice article. Just wanted to point out in case people are curious that Dart is looking at adding pattern matching, since it's mentioned in the article. https://github.com/dart-lang/language/tree/master/working/0546-patterns https://github.com/dart-lang/language/tree/master/working/05... @munificent, not sure if that's the link you'd want.
- munificent 6y agoYeah, that link is the right one, thanks. :)
- yxhuvud 6y agoAnother example of nullable types is Crystal, BTW.