On 11/11/2013 01:55 PM, Dicebot wrote:
On Monday, 11 November 2013 at 01:49:45 UTC, Timothee Cour wrote:
People have shunned proposals to have @mixin functions because it
wouldn't
be obvious at call site that some statement is executed under a mixin
(which could access all variables in scope etc).

The same will happen here; I think it should be clear at call site that a
macro is used.
How about:

macro!myAssert(1 + 2 == 4);
instead of myAssert(1 + 2 == 4);

If macros are supposed to access outer scope, I agree, this is a
necessary restriction.

I don't agree. (The argument against implicit mixin features was a complete lack of hygiene, not the mere possibility of accessing the caller scope.)

Reply via email to