4 ms·
Some of the things in that list are being done already or provided in different ways. Implementations have weak hash support; not all exactly the same. I haven
by kazinator 10y ago
Some of the things in that list are being done already or provided in different ways.
Implementations have weak hash support; not all exactly the same. I haven't seen weak references; that would be an invention.
There are expand-all type functions; not all the same.
Could it be a library function? Not one that supports everything in every implementation. The code walker support would help.
What if an implementation has a &foobar keyword that is supported in its macro lambda lists? A portable expander that doesn't know about this won't properly handle macros that use it. (It will handle global macros because it just calls those, but expand-all has to itself implement macrolet).
Code walking is done, with ugly portability switching and whatnot.
Also w.r.t. that, add:
- useful accessors on macro environment objects!
You can't do anything with a macro &env now other than pass it to macroexpand or macroexpand-1. It holds useful information like "is X a lexical variable in this scope?"
Speaking of lambda lists:
- standard parser for lambda and macro lambda lists.