5 ms·
Do you mean the macros specifically, or Scala in general?
by kenbot 14y ago
Do you mean the macros specifically, or Scala in general?
- lucian1900 14y agoScala in general, and the macros are an especially bad case.
- kenbot 14y agoGranted macros are a two edged sword complexity-wise, this implementation is no exception. I think this is generally true for macros in other languages though. Scala's "self cleaning" reify/eval mechanism is practically free syntax-wise - even Lisp has special characters for quasiquoting and splicing.
- lucian1900 14y agoFrom what I'm seeing the macros are almost hygienic, which I guess is more than one can say about Common Lisp. But what you're describing as "self cleaning" just confuses me. Compare the implementation of this particular macro with those in Scheme, Clojure or even Boo.
- soc88 14y agoSelf-cleaning basically means that they have a absolutely minimal, unhygienic macro and implemented the method which enforces hygiene as a macro itself – pretty impressive imho. Maybe this one helps a bit: http://news.ycombinator.com/item?id=3912885 http://news.ycombinator.com/item?id=3912885 There is also a more detailed talk on macros, although I'm not sure it is already on the Skillsmatter site. Here are the slides: http://scalamacros.org/talks/2012-04-18-ScalaDays2012.pdf http://scalamacros.org/talks/2012-04-18-ScalaDays2012.pdf and also http://scalamacros.org/talks/2012-04-28-MetaprogrammingInScala210.pdf http://scalamacros.org/talks/2012-04-28-MetaprogrammingInSca....