News for hackers. Stuff that matters.
Re:Abstract Syntax Tree for Patching Code and Assessing Code... by dasyatidprime on Monday June 07, 2021 @06:16AM (#27420866)
I was assuming that at minimum the forms would be fully macroexpanded first (though macrolet is its own problem there). I also have the sense this might be easier in some Scheme dialects, but I don't know any of them well enough to say (thus that's part of my question).
Re:Abstract Syntax Tree for Patching Code and Assessing Code... by foldr on Monday June 07, 2021 @06:56AM (#27421101)
IIRC it's difficult to walk macroexpanded code in Common Lisp because you have to deal with lots of implementation-specific special forms.

(Edit) This article has some good info: https://zenodo.org/record/3254669#.YL3-WzYzb2w

Re:Abstract Syntax Tree for Patching Code and Assessing Code... by thelopa on Monday June 07, 2021 @02:09PM (#27425947)
Exactly! If you walk the expanded form you have implementation-specific junk to deal with. Also, it may not be possible to map a form post-expansion to a source location. If you walk the pre-expansion form you’re going to get bad results. There’s no winning here unless you have help from the implementation.
Re:Abstract Syntax Tree for Patching Code and Assessing Code... by TeMPOraL on Monday June 07, 2021 @12:03PM (#27424147)
CL being CL, it's important to remember that macroexpansion itself can do anything a real program can. Including writing files, opening network connections, etc.