2 ms·
Scala has macros [0], and as you reasoned the type checker has to run after the macro expansion. That's not a huge downside; to the user it still appears to be
by necubi 12y ago
Scala has macros [0], and as you reasoned the type checker has to run after the macro expansion. That's not a huge downside; to the user it still appears to be a single pipeline (parsing -> macro expansion -> type checking -> compilation).
Haskell also has very powerful metaprogramming facilities, like template haskell [1].
[0] http://scalamacros.org/ http://scalamacros.org/
[1] https://wiki.haskell.org/Template_Haskell https://wiki.haskell.org/Template_Haskell