alexarchambault / scalacheck-shapeless

Generation of arbitrary case classes / ADTs instances with scalacheck and shapeless
Apache License 2.0
239 stars 34 forks source link

Comparison with shapeless-scalacheck? #2

Open FranklinChen opened 9 years ago

FranklinChen commented 9 years ago

I'm curious how this library differences from shapeless-scalacheck. Maybe you can add a note on the difference for those who already use that?

alexarchambault commented 9 years ago

You're right, I was thinking at the beginning to just submit scalacheck-shapeless to shapeless-contrib (https://github.com/typelevel/shapeless-contrib/issues/28), but it finally remained a separate project. I'm checking about the status of shapeless-contrib, and I think I'll add back a mention about it in the README once I'll know more.

alexarchambault commented 9 years ago

For now, the main difference is that scalacheck-shapeless depends on more recent versions of both shapeless (2.1-RC1) and scalacheck (1.12.1).

The coproduct support in scalacheck-shapeless is also more finely tuned, as all cases of the coproduct are given the same weight, which doesn't seem to be the case in shapeless-contrib.

The internals of both projects differ too: scalacheck-shapeless uses Lazy, which was added in shapeless 2.1, whereas shapeless-contrib uses TypeClass, which is less flexible than Lazy.