Am 14.11.2013 09:53, schrieb Walter Bright:
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.

"int + int" could be part of an PC<->GPU kombination that generates CUDA- and D-interchange code at compiletime


Reply via email to