www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Macro system in D

reply Yigal Chripun <yigal100 gmail.com> writes:
Here's an interesting article (PDF) discussing the Nemerle Macro system:
http://nemerle.org/metaprogramming.pdf

Could D adopt a similar design? What do you think?

--Yigal
May 07 2008
next sibling parent reply Dan <murpsoft hotmail.com> writes:
Yigal Chripun Wrote:

 Here's an interesting article (PDF) discussing the Nemerle Macro system:
 http://nemerle.org/metaprogramming.pdf
 
 Could D adopt a similar design? What do you think?
 
 --Yigal
D is not Nemerle. D does not use macros. D does not have syntax tree reflection, let alone built into the language. D most probably will not adopt a similar design.
May 07 2008
parent Yigal Chripun <yigal100 gmail.com> writes:
Dan wrote:
 Yigal Chripun Wrote:
 
 Here's an interesting article (PDF) discussing the Nemerle Macro system:
 http://nemerle.org/metaprogramming.pdf

 Could D adopt a similar design? What do you think?

 --Yigal
D is not Nemerle. D does not use macros. D does not have syntax tree reflection, let alone built into the language. D most probably will not adopt a similar design.
in the last D conference Walter did mention AST Macros. It probably just got postponed because of the const design. I hope D does get such a feature since it's a very powerful concept.
May 07 2008
prev sibling next sibling parent reply Robert Fraser <fraserofthenight gmail.com> writes:
Yigal Chripun wrote:
 Here's an interesting article (PDF) discussing the Nemerle Macro system:
 http://nemerle.org/metaprogramming.pdf
 
 Could D adopt a similar design? What do you think?
 
 --Yigal
D was getting macros (though not exactly the same as Nemerle's). In fact, there's even a macro.c in the DMD source. But I'm not sure if they've been dropped by the wayside; Walter hasn't mentioned them since the conference last year.
May 07 2008
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Robert Fraser wrote:
 Yigal Chripun wrote:
 Here's an interesting article (PDF) discussing the Nemerle Macro system:
 http://nemerle.org/metaprogramming.pdf

 Could D adopt a similar design? What do you think?

 --Yigal
D was getting macros (though not exactly the same as Nemerle's). In fact, there's even a macro.c in the DMD source. But I'm not sure if they've been dropped by the wayside; Walter hasn't mentioned them since the conference last year.
macro.c in the DMD sources is about DDOC macros. --bb
May 07 2008
parent Robert Fraser <fraserofthenight gmail.com> writes:
Bill Baxter wrote:
 Robert Fraser wrote:
 Yigal Chripun wrote:
 Here's an interesting article (PDF) discussing the Nemerle Macro system:
 http://nemerle.org/metaprogramming.pdf

 Could D adopt a similar design? What do you think?

 --Yigal
D was getting macros (though not exactly the same as Nemerle's). In fact, there's even a macro.c in the DMD source. But I'm not sure if they've been dropped by the wayside; Walter hasn't mentioned them since the conference last year.
macro.c in the DMD sources is about DDOC macros. --bb
Oops, my bad
May 07 2008
prev sibling parent reply terranium <spam here.lot> writes:
Bill Baxter Wrote:

 macro.c in the DMD sources is about DDOC macros.
 
and about what is a macro keyword?
May 08 2008
parent Robert Fraser <fraserofthenight gmail.com> writes:
terranium wrote:
 Bill Baxter Wrote:
 
 macro.c in the DMD sources is about DDOC macros.
and about what is a macro keyword?
A token you can't use as an identifier.
May 09 2008