September 2021
Beginner
560 pages
10h 49m
English
After reading this lesson, you will be able to
OptionOptionNow that you’ve mastered higher order functions, you’ll learn about the type Option. Using null to represent nullable or missing values in Scala is an antipattern; use the type Option instead. The type Option ensures that you deal with both the presence or the absence of an element. Thanks to the Option type, you can make your system safer by avoiding nasty NullPointerExceptions at runtime. Your code will also be cleaner as you will no longer preventively check for null values; you will be able to clearly mark nullable values and act accordingly only when effectively needed. The concept of an ...
Read now
Unlock full access