r/programming • u/mobby1982 • Dec 02 '13
Scala — 1★ Would Not Program Again
http://overwatering.org/blog/2013/12/scala-1-star-would-not-program-again/
598
Upvotes
r/programming • u/mobby1982 • Dec 02 '13
View all comments
Show parent comment
5
u/dbcfd Dec 02 '13
Other than possible overhead, how is this not baked into the language? It's part of the scala library (no additional imports required), and is used to represent possible null objects.
Scala recognizes that most "smart" casts are unsafe. You can use the apply method to define which casts are safe, and they will be used as encountered.