spartanz / schemaz

A purely-functional library for defining type-safe schemas for algebraic data types, providing free generators, SQL queries, JSON codecs, binary codecs, and migration from this schema definition
https://spartanz.github.io/schemaz
Apache License 2.0
164 stars 18 forks source link

Init the project's document #2

Closed vil1 closed 6 years ago

vil1 commented 6 years ago

This pull request is also intended as a mean of discussion prior the upcoming design sessions.

LGLO commented 6 years ago

Are we going to use macros?

beezee commented 6 years ago

@LGLO I would hope we can do this without them.

beezee commented 6 years ago

@vil1 I'm not sure the right way to phrase it, but I'd hope we can make this extensible in such a way that users can define typeclasses in terms of this rather easily (similar to how derivation works.)

Same as we list multiple "backends" for a schema (codecs, generators, sql) I'd love to see us prioritize a reasonable interface for users of the library to add their own "backends" and extend the functionality that can be derived from a schema definition.

vil1 commented 6 years ago

@LGLO, as @beezee I think we should (and probably can) avoid using macros, or at least keep their use to the bare minimum (translating a case class' structure into a schema).

@beezee not sure I get your point, but I do feel that we should have a separate Representation abstraction that would allow to have the same schema define the structure of Scala ADTs, Avro's GenericContainer and so on. In any case, this should be discussed around the (upcoming) design document.