2 ms·
Scala has the Try [0] and Either [1] types that can be used to achieve this. However, I believe Scala also allows any type to be NULL. In Rust there is no NULL
by aaronbee 13y ago
Scala has the Try [0] and Either [1] types that can be used to achieve this. However, I believe Scala also allows any type to be NULL. In Rust there is no NULL so you don't have to worry if a value is ever NULL unless it is explicitly wrapped in an option instance.
[0] http://www.scala-lang.org/api/current/index.html#scala.util.Try http://www.scala-lang.org/api/current/index.html#scala.util....
[1] http://www.scala-lang.org/api/current/index.html#scala.util.Either http://www.scala-lang.org/api/current/index.html#scala.util....