Re:Project for bringing macros to Scala
by draegtun on Wednesday November 09, 2011 @02:54PM
(#3217105)
This is how macros should always have been. I don't know of any other language which does this
They look very similar to Perl6 macros. See recent discussion here: http://news.ycombinator.com/item?id=3124920
The other nice thing about these is that you don't need to lose type safety to use macros. That's really where the innovation is here.
I don't yet fully understand how this all works at the type-theoretic level. I'm imagining that expressions (as opposed to the values they represent) are thought of as belonging to higher kinded types. The macros then reject expression which aren't of the right kind.
I have to say, I am absolutely flawed by the comments so far about this. I think this is going to have an absolutely pivotal effect on future programming languages. This is how macros should always have been. I don't know of any other language which does this. It's a totally new area in language theory to explore.