Re:Scala turns 10
by lmm on Monday January 20, 2014 @10:20AM
(#7089885)
What are the implications of not implementing FunctionN? Will the apply method still be there? Can I still pass the case class companion object to a higher order function? Will shapeless' Iso.hlist still work? (that's the big one really, as it allows dealing with case classes more-or-less generically)
[ Parent
| on HN ]
Re:Scala turns 10
by gourlaysama on Monday January 20, 2014 @10:36AM
(#7089983)
Yes the apply method is still there. But since it has more than 22 arguments, you cant't lift it into a function object anymore.
This will break some tools, like Play's forms, that need you to pass to a couple of serialization/deserialization functions.
Shapeless will probably be fine, or at least, since it is macro based, it will be able to go around the missing unapply and extract the fields directly, like pattern matching does. (I don't know shapeless enough to go into more details)