4 ms·
Lots of languages already use this syntax. Dart is another besides the ones already mentioned. (It uses "?" and has nullable types by default without needing "!
by Vt71fcAqt7 2y ago
Lots of languages already use this syntax. Dart is another besides the ones already mentioned. (It uses "?" and has nullable types by default without needing "!".) Also it kind of does make sense to me. A Java "String" is not actually a String. It's a String or null. It doesn't fit into set notation where null is an empty set, not part of other sets like integers ect. So calling it "String?" or "Integer?" makes more sense because it denotes that its value may be a String/Integer but it is not guaranteed to be so.
- Vt71fcAqt7 2y ago*Non-nullable types by default