On Thu, Sep 27, 2012 at 7:26 AM, Jason Zaugg <
jza...@gmail.com> wrote:
> Firstly, It's truly impressive how far Miles has gotten *without*
> macros in Shapeless for type class derivation. That said, I have a
> feeling that macros might be a bit more straight forward for some of
> these things.
>
> I'm definitely going to explore this in the future. But the payoff
> isn't immediate, as it will take some time for Scala 2.10 to be
> released and adopted. (And for us to release Scalaz 7, it would seem!)
(cross posting to shapeless-dev@, followups to scalaz@ please :-)
I agree that macros will make some things easier, but I don't think
they'll make the techniques used in shapeless redundant. On the
contrary, I think they'll make them even more practically applicable:
I'm particularly excited about the possibility of using implicit
macros to produce compile time witnesses (eg. of arithmetic
propositions) with tractable compile times and without runtime
overhead. And let's not forget runtime compilation: in some ways I
think this might be even more important both for shapeless and scalaz
... runtime selection of type class instances via lightweight staging
opens up all sorts of interesting possibilities.[1]
I've been reluctant for shapeless to have any dependencies at all, so
that I have complete freedom to track Scala master without having to
worry about the availability of compatible builds of dependencies ...
this, even to the extent of using only JUnit for tests. But I'm now
thinking that, once 2.10.0 is out of the door, this reason isn't quite
so strong. And if scalaz wants to pursue applications of macros
energetically, then I expect that both projects will be wanting to
track Scala master post 2.10.0 in much the same way.
For the future I definitely want to avoid things like the "pedagogic
subset of the Scalaz monoid" that I used to illustrate
(almost-)automatic type class derivation[2]. And I'd love to see
something like the project that Travis Brown suggested on Stack
Overflow[3] get off the ground.
So I'd like to see if we can work out some way for shapeless and
scalaz to collaborate more, while leaving both projects free to pursue
their own distinctive agendas.
I'd love to hear everyone's thoughts on this.
Cheers,
Miles
[1]
https://github.com/milessabin/shapeless/blob/master/examples/src/main/scala/shapeless/examples/staging.scala
[2]
https://github.com/milessabin/shapeless/blob/master/examples/src/main/scala/shapeless/examples/monoids.scala
[3]
http://stackoverflow.com/questions/12426269/round-up-of-scalaz-type-class-instances-for-other-libraries
--
Miles Sabin
tel:
+44 7813 944 528
skype: milessabin
gtalk:
mi...@milessabin.com
g+:
http://www.milessabin.com
http://twitter.com/milessabin