3 ms·
Even though it was never mentioned, I couldn't shake the feeling that he was talking about Scala. Scala allows nulls for compatibility with Java, but prefers th
by jorgeortiz85 18y ago
Even though it was never mentioned, I couldn't shake the feeling that he was talking about Scala. Scala allows nulls for compatibility with Java, but prefers the statically checked Option type (equivalent to Haskell's Maybe). It puts variables (var) and final variables (val) on equal syntactic footing, but convention dictates you use a val by default and only switch to var if it's really necessary. Case classes and pattern matching let you define statically checked data types. Type inference helps so that all the static typing doesn't get in your way, but errors are still caught at compile time.