Got you, you say that we can have several functions with those tweaks , and create case class for each. would you place them in an object that will contain those factory methods ? on the other to keep them in the original class so class Name will have a method .getNames:FullName
(where FullName is of type FullName(first: String, last: String)
) doesn’t seem right. I would except that factory methods of class Name will return class Name
I agree that this is a design issue. on one hand this is just operation on one of the members I’m afraid that creating case class for each method will be an overhead. on the other hand we want to keep the ADT as clean of biz logic as much as possible