//
sign in
Post
by @danabra.mov
PostEmbed
by @danabra.mov
Record
by @jimpick.com
Record
by @atsui.org
+ new component
Post
#Kotlin is better than #Scala for dealing with nullability. #Java has JSpecify & upcoming support for null restrictions. In Scala we rely on social conventions (Option), while the type system is YOLO on `null`. And Scala 3's -Yexplicit-nulls is flawed. contributors.scala-la...
7h
Hello, Currently, under the normal type system, Null is a magical type. It’s not really a class (despite how it’s presented in the doc. It has special rules to make it a subtype of every reference class type. This is illustrated by the following class diagram: Under -Yexplicit-nulls, Null is less magical. In the core type system, it is almost a regular class (with a single instance null), which extends Matchable (and hence Any). There are no special subtyping rules in the core type system f...
contributors.scala-lang.org
Make Null a subclass of AnyVal under -Yexplicit-nulls
Alexandru Nedelcu