2.10 macros: Function1-22, Product1-22 and Tuple1-22

190 views
Skip to first unread message

richard emberson

unread,
Mar 13, 2012, 5:20:37 PM3/13/12
to scala-l...@googlegroups.com
With Scala 2.10 will all of the explicit Function1-22, Product1-22
and Tuple1-22 classes/files be replaced with macros that
generate the classes at compile-time?

Are the 2.10 Scala macro capable of generating such classes?

The reason I ask is I've got a couple of APIs and
implementations that use take Tuples, 1-22, as arguments
and it would be nice if I could replace all that cut/paste/modify
with my own set of macros that iterate over 1-22 and simple
generate (in my case) methods and/or their implementations.

Thanks

Richard Emberson

--
Quis custodiet ipsos custodes

martin odersky

unread,
Mar 13, 2012, 5:51:33 PM3/13/12
to scala-l...@googlegroups.com
On Tue, Mar 13, 2012 at 10:20 PM, richard emberson
<richard....@gmail.com> wrote:
> With Scala 2.10 will all of the explicit Function1-22, Product1-22
> and Tuple1-22 classes/files be replaced with macros that
> generate the classes at compile-time?
>
> Are the 2.10 Scala macro capable of generating such classes?
>
> The reason I ask is I've got a couple of APIs and
> implementations that use take Tuples, 1-22, as arguments
> and it would be nice if I could replace all that cut/paste/modify
> with my own set of macros that iterate over 1-22 and simple
> generate (in my case) methods and/or their implementations.
>
Not with the present SIP, which only deals with macros in function
position. But it's something we'd like to be able to do in the future.
One step after another...

Cheers

-- Martin

Reply all
Reply to author
Forward
0 new messages