3 ms·
This is essentially what Dart does: https://api.dart.dev/stable/2.10.4/dart-core/Null-class.html https://api.dart.dev/stable/2.10.4/dart-core/Null-class.html
by munificent 6y ago
This is essentially what Dart does:
https://api.dart.dev/stable/2.10.4/dart-core/Null-class.html https://api.dart.dev/stable/2.10.4/dart-core/Null-class.html
The main change with adding nullable and non-nullable types to the language is that we no longer treat Null as a subtype of all types. Instead, you have to opt in using "?", which is basically syntactic sugar for "| Null".