Constructing simple Scala case classes from Strings, strictly without boiler-plate
I seek succinct code to initialize simple Scala case classes from Strings (e.g. a csv line): case class Person(name: String, age: Double) case class Book(title: String, author: String, year: Int) case class Country(name: String, population: Int, area: Double) val amy = Creator.create[Person]("Amy,54.2") val fred = Creator.create[Person]("Fred,23") val hamlet = Creator.create[Book]("Hamlet,Shakespeare,1600") val finland = Creator.create[Country]("Finland,4500000,338424") What's the simplest Creator object to do this? I would learn a lot about Scala from seeing a good solution to this. (Note