Overloading relational operators separately; thoughts?

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 28 07:14:46 PDT 2016


On Wednesday, 28 September 2016 at 13:58:35 UTC, Timon Gehr wrote:
> Assume I have two symbolic expressions a and b:
>
> Expression a=variable("a"), b=variable("b");
>
> Why should I be allowed to do
>
> auto c = a + b; // symbolic value a + b
>
> but not
>
> auto d = a <= b; // symbolic value a <= b
>
> The string parsing approach is not useful here: how do I use 
> existing expressions that are accessible in the scope to build 
> new expressions?

Thanks for expressing this so clearly. This is exactly the sort 
of thing I want to be able to do.


More information about the Digitalmars-d mailing list