www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - What is the 'macro' keyword for?

reply =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
It is listed as a reserved keyword

- in TDPL

- at http://dlang.org/lex.html

- at https://github.com/bhelyer/SDC/blob/master/src/sdc/token.d

Is it still used? What is/was it for?

Ali
Jun 26 2012
next sibling parent "Jonathan M Davis" <jmdavisProg gmx.com> writes:
On Tuesday, June 26, 2012 14:35:23 Ali Çehreli wrote:
 It is listed as a reserved keyword
 
 - in TDPL
 
 - at http://dlang.org/lex.html
 
 - at https://github.com/bhelyer/SDC/blob/master/src/sdc/token.d
 
 Is it still used? What is/was it for?
Nothing right now. If we ever get any kind of AST macros, then maybe it'll be used for those, but for now, it's just reserved. I'm not aware of it ever having been used for anything. - Jonathan M Davis
Jun 26 2012
prev sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Tue, Jun 26, 2012 at 02:35:23PM -0700, Ali Çehreli wrote:
 It is listed as a reserved keyword
 
 - in TDPL
 
 - at http://dlang.org/lex.html
 
 - at https://github.com/bhelyer/SDC/blob/master/src/sdc/token.d
 
 Is it still used? What is/was it for?
[...] AFAIK, it is reserved for the future possibility of some kind of macro system (perhaps an AST transformation system). I don't think it's currently used in any way. T -- To provoke is to call someone stupid; to argue is to call each other stupid.
Jun 26 2012