kellysmith12.21
2020-10-28 11:51:49

Would it be possible to statically track which macros are unhygienic and the extra bindings they introduce? (e.g. struct)


samth
2020-10-28 15:59:20

What do you mean by “statically”?


laurent.orseau
2020-10-28 16:02:03

I suppose that could mean “by looking at the macro itself without knowing in what contexts it is used”


kellysmith12.21
2020-10-28 16:04:40

By “statically” I mean, determining hygiene at the macro’s compile time, if that makes sense.


kellysmith12.21
2020-10-28 16:07:12

Although, now that I think about it, the fact that Racket macros can perform arbitrary computation probably makes it difficult to perform any kind of static analysis on them. Though, such things are far outside my current knowledge, so that’s entirely speculative.


laurent.orseau
2020-10-28 16:08:25

In general you won’t be able to say much of course, but if the macro is constrained is some ways, I’m pretty sure there are many simple and useful cases that can be easily proven to be hygienic.



kellysmith12.21
2020-10-28 16:34:30

It looks like I have some reading to do :smile:


laurent.orseau
2020-10-28 16:40:21

This is impressively clearly written!