Thread overview
Macro system in D
May 07, 2008
Yigal Chripun
May 08, 2008
Dan
May 08, 2008
Yigal Chripun
May 08, 2008
Robert Fraser
May 08, 2008
Bill Baxter
May 08, 2008
Robert Fraser
May 07, 2008
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 08, 2008
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 08, 2008
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 08, 2008
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 08, 2008
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 08, 2008
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.