DIP 50 - AST macros

Walter Bright newshound2 at digitalmars.com
Thu Nov 14 00:53:24 PST 2013


On 11/13/2013 11:37 PM, Jacob Carlborg wrote:
> On 2013-11-14 01:16, Walter Bright wrote:
>
>> Yes. But that's a good thing. I'd be pretty skeptical of the value of an
>> AST macro that took 3+4 and changed it so it did something other than
>> compute 7.
>
> You can still do stupid things like that with operator overloading. Not on
> built-in types, but on user defined types. Every language allows you to do
> stupid things, one way or another.

Sure, but the issue is that expression templates are not for "int+int", but for 
"T+int". My question is what value would there be in a rewrite of "int+int" to 
mean something different.



More information about the Digitalmars-d mailing list