How about macro == symbol for mixin statement? [was Re: Member functions C to D]

Yigal Chripun yigal100 at
Tue Oct 13 23:07:10 PDT 2009

On 12/10/2009 10:47, Don wrote:
> Ah, OK. My cursory glance at Nemerle just screamed "hack". But first
> impressions can be misleading.
> No doubt as a C-family language, they have some useful ideas.
> But if Christopher's analysis is correct, the "macro" bit is different
> to the "plugin" bit. I think allowing the ASTs to be _modified_ by
> plugins is the path to madness, but a read-only ABI is OK (it's hard to
> see how compile-time reflection is possible without creating some kind
> of API).

modifying the AST is dangerous but how would you do things like making a 
class implement an interface without modifying the list of interfaces 
the class implements ?

class Foo {...}

the Nemerle macro above transform this into:

class Foo : Serializable { ... }

what would be your design for this?

More information about the Digitalmars-d-learn mailing list