Hacker News new | past | comments | ask | show | jobs | submit login
Why Nullable Types? (medium.com/dartlang)
4 points by markdog12 on Dec 7, 2020 | hide | past | favorite | 4 comments



Author 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.


As 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/05...

@munificent, not sure if that's the link you'd want.


Yeah, that link is the right one, thanks. :)


Another example of nullable types is Crystal, BTW.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: