yamlscript
yamlscript copied to clipboard
Macro system for YAMLScript (defys)
The YAMLScript compiler currently does a lot of special things mixed in with its core set of transformations.
The proposed defys system allows these special things to be plain hooks into a given compilation stage.
We want to expose the defys system to users who want to make their own localized sub-DSLs in YS.
This fits the Lisp concept of Macros. Things that let you make your code look more the way you want, when the basic syntax feels clumsy.
But this happens in the YS compiler transformation from YAML to Clojure.
The Clojure defmacro system is, of course, still supported. It's just at another level.
- https://code.thheller.com/blog/shadow-cljs/2019/10/12/clojurescript-macros.html