[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unhygienic macros
Lauri Alanko wrote:
> But if there are some pitfalls to using the
> entire expression (stx) as the context, I may have to think of something
> else.
If you're defining a general, re-usable mechanism, don't tie the
user's hands by fixing one particular source. Let them pass it as a
parameter. It's good for them to think about what to pass, anyway.
If you insist on explicit variable capture/binding, then you really
must think about its scope, not just toss it out there and hope for
the best. Making this an explicit parameter rightly puts that burden
on the programmer.
Shriram