Re:Why nullable types?
by munificent on Tuesday December 08, 2020 @12:53PM
(#25348858)
You could define operations on nullable types to allow this in Dart, like:
For method calls, we have a null-safe method call syntax that automatically lifts the operation to give you a nullable result:
We could have made all operations implicitly do this lifting, but our experience is that this isn't what users want. They want to know as early in their code when an operation on a potentially-absent value is attempted and reconcile right there what behavior they want.
[ Parent
| on HN ]
There are no comments on this comment yet.