Now that explicit nulls are merged, I wanted to raise an issue of naming: Should we continue to use JavaNull for the null type that comes from the host system and is not checked? Isn't Java too specific, after all there's also a null in JS and in C, and whatever other language runtime Scala might be embedded in?
Alternatives could be:
PlatformNull
UncheckedNull
UnsafeNull
SilentNull
LegacyNull
It would be good to get further suggestions and feedback on this.
At least for JavaScript, all possible nulls would be explicitly written out in the fa莽ade types, which are written in Scala. So in Scala.js we'll never use the platform Null.
For Native it's less clear. An automated importer from C headers would probably choose to use the platform Null when typing pointers.
I believe UncheckedNull is a good one. It fits the narrative of Scala.js which has socalled unchecked behaviors for error conditions such as class cast and index out of bounds.
Most helpful comment
At least for JavaScript, all possible
nulls would be explicitly written out in the fa莽ade types, which are written in Scala. So in Scala.js we'll never use the platformNull.For Native it's less clear. An automated importer from C headers would probably choose to use the platform
Nullwhen typing pointers.I believe
UncheckedNullis a good one. It fits the narrative of Scala.js which has socalled unchecked behaviors for error conditions such as class cast and index out of bounds.