Open ingydotnet opened 2 weeks ago
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.
defys
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.
defmacro
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.