Chapter 15
Optional Values
WHAT’S IN THIS CHAPTER?
- Expressing the lack of values
- The implementation of an Option type
Programmers of languages derived from C have long been familiar with null as a representation of “nothing.” In spite of common disadvantages that date back as long as the keyword null itself, the concept is still around today. Functional languages have a different heritage when it comes to expressing “nothing” and the approaches used there can also be mirrored in C#.