How can I dump an expression into log and execute it

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 14 08:29:00 PDT 2014


On Monday, 14 July 2014 at 15:13:21 UTC, Timon Gehr wrote:
> On 07/14/2014 11:55 AM, Dicebot wrote:
>> I must admit D is far from perfect in that regard because 
>> operator
>> overloading is still not limited enough
>
> There is no real point in limiting it at all. It is just a 
> matter of naming your functions properly.
>
> auto subtract(int a, int b){ return a+b; }

Same principle of surprise minimization. Reader expects arbitrary 
actions done by function call. Reader expects arithmetical 
semantics from arithmetical operations. I don't see "you can 
change anything" language working for any large team production.


More information about the Digitalmars-d mailing list