Arc Forumnew | comments | leaders | submitlogin
Lightweight Modular Staging: transform programs into fast code-generators (github.io)
3 points by akkartik 426 days ago | 3 comments


4 points by akkartik 426 days ago | link

The key idea: turn strings to code inside quasiquote, and turn code to strings inside unquote.

https://scala-lms.github.io/tutorials/02_basics.html

-----

3 points by Oscar-Belletti 426 days ago | link

So now Scala has got macros?

Are they comparable to lisp ones? What do you think?

-----

3 points by akkartik 426 days ago | link

Looks like Scala has some experimental macro feature: http://docs.scala-lang.org/overviews/macros/overview.html. I imagine people will be about as likely to use it as they've been to use previous non-lisp macros (i.e. not very likely).

OP isn't about macros because the output of the function isn't automatically evaluated. It's a step in the direction of allowing any programmer to perform compiler transformations and optimizations on his/her own code. I'm very interested in that area.

-----