Scala. Can case class with one field be a value class?
You can have a case class that is a value class. As you can see from the example below, there is no object creation. Except of course the inevitable boxing if you would upcast to Any. Here is a little piece of scala code class ValueClass(val value:Int) extends AnyVal case class ValueCaseClass(value:Int) extends AnyVal class … Read more