null values vs "empty" singleton for optional fields
- by Uko
First of all I'm developing a parser for an XML-based format for 3D graphics called XGL.
But this question can be applied to any situation when you have fields in your class that are optional i.e. the value of this field can be missing.
As I was taking a Scala course on coursera there was an interesting pattern when you create an abstract class…