You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's pretty limited, but sufficiently simple marcos could be shadowed this way in a single definition. This might be good enough for the type of things we'd want shadowed anyway.
The text was updated successfully, but these errors were encountered:
As for the limitations, in particular, defshadowed doesn't support any &-syntax, like &rest in its arguments list.
It only works on simple templates. The function definition expands it in advance, so any kind of conditional expansion won't work right. This limitation is more fundamental to the approach. The only general way around that is to macroexpand in the function at runtime and then eval it, which would perform poorly. But even that would choke on non-hygienic macros, and everything that broke let.
There may be certain other special cases we could automate, like when a variadic macro could be implemented as a reduce over the binary case, like most of our operators. Our shadow implementation is pretty repetitive.
From a discussion in hylang/hy#1346
It's pretty limited, but sufficiently simple marcos could be shadowed this way in a single definition. This might be good enough for the type of things we'd want shadowed anyway.
The text was updated successfully, but these errors were encountered: