Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rewrite binders using shapeless #299

Open
bblfish opened this issue Sep 7, 2015 · 1 comment
Open

rewrite binders using shapeless #299

bblfish opened this issue Sep 7, 2015 · 1 comment

Comments

@bblfish
Copy link
Member

bblfish commented Sep 7, 2015

@milessabin's at the Dublin Scala user's group shows how to remove the boilerplate from case class serialisers and deserialisers, based entirely on compile time type inferencing. Also what he shows without mentioning it is what appears in CategoryTheory as the notion that products and sums are opposites. ( A sum in one category will be a product in the opposite category - the category where all arrows are reversed ) Products are mapped to class fields, and sums to subclassing... ) See the video https://www.youtube.com/watch?v=LaOiBdrM8uo

This could make the binders package much more useable.

@bblfish
Copy link
Member Author

bblfish commented Sep 7, 2015

If you're wondering in the talk about how the unification of products and sums will go in Shapeless 3, Miles Sabin wrote: "If you want a taste of how this will play out in shapeless 3 you should take a look here: https://github.com/.../src/main/scala/shapeless/smc.scala
As you can see there we can abstract over products and coproducts in a way which means that we can share all the operations between the two.
It also demonstrates that we don't need to commit to any particular concrete carrier type (ie. the current HList and Coproduct types), we can just as easily use nested pairs and Either (or anything else structurally similar)."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant