4 ms·
Scala carries some baggage from being on the JVM that makes this not-quite-true, but it mostly enforces all of those things in the type system. There's no null
by ebola1717 10y ago
Scala carries some baggage from being on the JVM that makes this not-quite-true, but it mostly enforces all of those things in the type system. There's no null-checking required, and if something can fail, the type system should tell you.
e.g. your method signatures will read
doSomethingRisky(): Try[Result]
and to use that value you'll either have to carry that Try forward, or handle its failure cases.