yamlscript icon indicating copy to clipboard operation
yamlscript copied to clipboard

Macro system for YAMLScript (defys)

Open ingydotnet opened this issue 1 year ago • 1 comments

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.

ingydotnet avatar Jun 23 '24 13:06 ingydotnet

  • https://code.thheller.com/blog/shadow-cljs/2019/10/12/clojurescript-macros.html

ingydotnet avatar Jul 25 '24 22:07 ingydotnet