DIP78 - macros without syntax extensions
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Wed May 27 12:15:24 PDT 2015
On 2015-05-27 14:17, Kagamin wrote:
> Well, that's the point: the function is a normal function, only some of
> its parameters require specially prepared arguments, this can't be
> missed as soon as arguments are passed to the respective parameters.
I prefer to be more explicit in this case, especially since the keyword
is already available.
>> In that case I would prefer the "macro" keyword. It's already a
>> reserved, for exactly this purpose, so it will be backwards compatible.
>
> Well, maybe, I just didn't need the keyword.
I don't need it either, it's just what I preferred.
> No, passing of Context is not proposed.
The feeling I have it that it's hard to know if it's needed or not
without implementing/using the macro system.
> I mean, the template instantiation syntax can inform the compiler that
> the expression is evaluated at compile time with possible code
> generation, so that the compiler is prepared to what macro will do. This
> resembles similarity between macros and templates. If macros can use
> existing syntax of a function call, I see no problem if they use another
> existing syntax.
True, but how would that the syntax look like for template macro, if
possible?
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list