digitalmars.D - macro keyword taken?
- Andrej Mitrovic (8/8) Aug 07 2011 So I wanted to make myself a template called "macro", but it turns out
- Robert Clipsham (10/18) Aug 07 2011 It was originally going to be used in D2 for AST macros, however it was
- =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= (3/21) Aug 08 2011 Would you happen to have a link? My Google-fu seems to be weak today.
- Andrej Mitrovic (4/4) Aug 08 2011 I think he means the "The Future of D" videos found here:
- bearophile (4/6) Aug 08 2011 Like "goto" keyword in Java :o)
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?
Aug 07 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/
Aug 07 2011
On 08-08-2011 01:07, Robert Clipsham wrote:On 07/08/2011 23:59, Andrej Mitrovic wrote:Would you happen to have a link? My Google-fu seems to be weak today. - AlexSo 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.
Aug 08 2011
I think he means the "The Future of D" videos found here: http://prowiki.org/wiki4d/wiki.cgi?Videos What I'm wondering about is whether something like this is still planned though. I don't mind the keyword being taken that much.
Aug 08 2011
Andrej Mitrovic:What I'm wondering about is whether something like this is still planned though. I don't mind the keyword being taken that much.Like "goto" keyword in Java :o) Bye, bearophile
Aug 08 2011