DIP 50 - AST macros

Rob T alanb at ucora.com
Sun Nov 17 13:50:09 PST 2013


Walter,

what do you think about allowing mixins to work with parameter 
list construction?

Currently you cannot generate code unless it is syntactically 
complete on its own, this disallows parameter list construction 
even for syntactically correct parameter lists.

The other failure point of mixins is when stringing together 
function calls with the dot, eg A.mixin(MYFUNC).foo;

A whole lot more could be done with mixins if restrictions were 
relaxed just a bit more in a few key areas. I don't see too much 
obfuscation happening so long as the allowable constructs are 
carefully limited and cannot be manipulated in ways that factor 
into the concerns you mentioned previously.

To make it clear we could have a special parammixin() and 
dotmixin() or whatever to ensure there's no possibility of 
confusion.

--rt


More information about the Digitalmars-d mailing list