I have a set of case classes with parameters. These case classes are used by a couple of methods. When I make a small change to one of these case classes by adding a new parameter, then I have to fix all those lines of code that uses this case class. How do I avoid this but at the same time have only vals as parameters in my case classes?
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry wrote:Option types to the rescue. For the optional parameters, I'm going to wrap them in an Option type.
I did use option types yesterday evening and after a couple of review at them, I made up my mind to get rid of them. I'm thinking of using these case classes with mixin traits! Is there any other idea that I could think of?