I've talked to quite a few people about what we value in courier. The recurring themes are schema introspection and some distance from scala (i.e. rather than using straight case classes and tying ourselves even tighter to scala). I'll not recap all the problems/complaints with courier here (unless you'd like me to. Please let me know if that would be valuable.)
As an object of discussion, I'd like to propose the approach typified by the prototype below. Key characteristics of this approach worth reemphasizing are:
We opt in in a type-by-type basis with @backend="simple"
There is a direct and obvious translation from the courier declaration to idiomatic scala code
The resulting class is indeed much simpler (compare WithPrimitives.scala to WithPrimitivesSimple.scala)
We still retain the current courier syntax
If we were to ever move away from scala, we ought to be able to write a similarly simple codegen for our new language and keep all our existing courier declarations
We automagically generate the schema value in a way that doesn't entail writing out lots of boilerplate
I've talked to quite a few people about what we value in courier. The recurring themes are schema introspection and some distance from scala (i.e. rather than using straight case classes and tying ourselves even tighter to scala). I'll not recap all the problems/complaints with courier here (unless you'd like me to. Please let me know if that would be valuable.)
As an object of discussion, I'd like to propose the approach typified by the prototype below. Key characteristics of this approach worth reemphasizing are:
@backend="simple"
WithPrimitives.scala
toWithPrimitivesSimple.scala
)