While I love null safety, It's hardly a given. For Dart in particular, it sounds like there was a serious discussion about the choice, and it could have gone the other way.
(edit: removed incorrect statement about Python's type safety)
FWIW my (1 year old) experience with mypy was very poor. Stuff breaking between releases, wrong resolution, bugs. It kinda felt like a 3rd party fun project, not an official high quality solution.
The fact that the source can contain completely wrong declarations and Python will happily run it anyway felt really bad. It's kinda like JavaDoc rather than a classic type system.
Languages like Java, Go and C were all designed before it became obvious that `Option<>` or `?` were obviously the right thing to do.
You can live with it, but most language eventually add some way to deal with it. Java has @NonNull. Javascript and Python both have static type annotations that are non-nullable. Even C++ has some attempt at it (std::option<>).
The only one I know of that hasn't bothered trying is Go.
But only to ML and Haskell programmers. Not it is obvious to basically everyone. (Excluding people who just haven't discovered static typing at all yet.)
Zero-values and pointers-as-options is not even half as good as Option<T>. At best, it was easy to implement, and convenient to use, until you actually had to run the program.
I dunno, we had a terrible experience with Go nils at my current job:
- It's super-easy to create a situation where some some obscure code fragment can cause a panic and crash the whole app due to nil pointer access, especially in multithreaded scenarios
- We had to start using linters to track possible nil errors early on
- Eventually we just moved to Kotlin, where this is not an issue
- And don't get me started on nil interfaces, good luck properly checking nilability and tracking these kind of issues
I mean all of those things are downsides to having unsafe nullability. However, my point was that those things obviously aren't deal breakers for many, many people as Go is still extremely popular.