Re:Project for bringing macros to Scala
by mindslight on Wednesday November 09, 2011 @01:13PM
(#3216628)
Macros have their place, but not as the primary basis of a language (sorry, Lisp), where most things unnecessarily become macros to avoid explicit function literals or quoting. Then to do anything reasonable you're using several language "extensions" at any one given time, which can only compose in ways the macro writers forsaw. Most of what is done with Lisp macros can be done with first-class function literals, in a way that makes it pretty clear that non-linear control flow is going on.
Macros in Scala? I don't know, the language already seems quite complex without introducing custom syntax. But if they're more of an occasionally-used compiler extension for specific internal DSLs rather than a by-example use-them-everywhere, I don't see them hurting.
That being said, I'm quite enjoying taking a break from JVM hell and doing some exploratory programming in Racket. If special forms are well documented, widely used, and syntax checked, the extra mental overhead isn't burdensome.
Macros in Scala? I don't know, the language already seems quite complex without introducing custom syntax. But if they're more of an occasionally-used compiler extension for specific internal DSLs rather than a by-example use-them-everywhere, I don't see them hurting.
That being said, I'm quite enjoying taking a break from JVM hell and doing some exploratory programming in Racket. If special forms are well documented, widely used, and syntax checked, the extra mental overhead isn't burdensome.