macro keyword taken?

Robert Clipsham robert at octarineparrot.com
Sun Aug 7 16:07:01 PDT 2011


On 07/08/2011 23:59, Andrej Mitrovic wrote:
> So I wanted to make myself a template called "macro", but it turns out
> it's a keyword:
>
> template macro()
> {
> }
>
> test.d(7): TemplateIdentifier expected following template
> test.d(7): Declaration expected, not 'macro'
>
> Is there something planned with this keyword?

It was originally going to be used in D2 for AST macros, however it was 
found that string mixins (an already existing feature) were already as 
powerful as the proposed AST macros. As such, the keyword is reserved 
for future use, possibly in D3 once the details have been reconsidered.

There's a video lying around somewhere of Walter presenting what would 
have been macros somewhere if you're interested.

-- 
Robert
http://octarineparrot.com/


More information about the Digitalmars-d mailing list