|
|
|
|
|
by zelphirkalt
243 days ago
|
|
I see. Good to know, that people have thought about that before. It would make macros even more powerful. But I am not quite sure, (a) what misuses it would encourage or at least enable and (b) how often one would need that power or how often it would be better than some other workaround. But it did come up sometimes when I did something with macros, having me think: "But how to do this???" and not finding a way, other than having the macro be in an outer scope/higher up scope, so that it has more info to work with. I guess such a macro system might also lend itself better to implementing type systems. Which makes me think of typed Racket. But I think they are rather using source code location info from their syntax object to look up surrounding context, or are using some kind of global state to store info for inference. I don't know this for sure, because I have been unable to understand TR. Maybe someone can chime in on that. |
|