Meta-programming  

Meta-programming must be designed in from day 1

Four goals:

  • Defining new syntax
  • Type-directed code generation
  • DSLs
  • Runtime code generation

Thoughts

  • Defining new syntax/DSLs may be the same thing, depending on how powerful/general the syntax definition mechanism is.
  • It would be nice enough if the DSL support were powerful enough to build XML/JSON dsls that have nothing in common with mensch core syntax.
  • It would be good to define as much of the language syntax in the language as possible.
  • Type-directed code generation is for serialization, api wrapping, etc.

Pattern language approach

Low-level language like beta, metaprogramming works in this world. High-level syntax sits on top.

This may result in LISP macro hell. Layered custom syntax constructs hide intent + obscure error reporting.

Comments powered by Disqus