Syntax vs datum. Syntax usually needs source locations tagged for good error reporting at minimum. String-> String or unannotated Sexp->Sexp are not going to be able to
CPP macros are string to string. Preprocessor style. They do annotate original source locations though.
[bindings as sets of scopes(https://www.cs.utah.edu/plt/scope-sets/) “Let’s Build a Hygienic Macro Expander” by Matthew Flatt syntax objects
Hmm. macros are close to term rewriting. Quoting is a way of talking about syntax and meaning… Hmm. egglog macros expander if hygienic needs this stuff… We often want to switch between term and semantics views. Stepping out of the binding table. scope vs context a set of scopes is perhaps like an eclass of scopes metatheoryjl possibly had thoughts on this. generatedfunctions etc https://pl.ewi.tudelft.nl/research/projects/scope-graphs/ scope graphs a theory of name rtesolution
https://github.blog/2021-12-09-introducing-stack-graphs/ https://docs.rs/stack-graphs/0.10.1/stack_graphs/ Stack graphs at github for resoling references. This is an interesting dataflow/datalog feeling problem actually He mentions that dataflow is intertwined https://www.youtube.com/watch?v=l2R1PTGcwrE&ab_channel=StrangeLoopConference incrmenetal zero-config code nave partial path concat… proof? groupoid? tree sitter has patterns and rules and now graph construction? This does
Macros in Lean4
Macros like rust. Languages that aren’t uniform like lisp
[paper describing different generative programming systems] “micros”
A Third Perspective on Hygiene
See also: Partial Evaluation.
Raw macros work on syntax. Hygienic macros pay more attention to scope. They attach scope identification data to the syntax tree.
dynamic scope and lexical scope Without macros, the scope of binding forms is straightoforward. With macros,
sets of scopes - Flatt. Does this lattice maybe have something
Syntax objects in racket - More than just s-expressions. Annotated with source locations but also scope.
What about gensymming?