overloading operators for I/O

Manfred Nowak svv1999 at hotmail.com
Wed Feb 14 15:44:05 PST 2007


Walter Bright wrote

> I disagree, because this is in the context of computer
> programming, not abstract algebra. C++ stands out alone in its use
> of << for such, and is therefore unconventional.

I do not understand with what you disagree.

However, I agree with you, that the semantics of << in C++ distorts at 
least my thinking as much as 1- x in the semantics of lisp.

I understand your wish to have fixed meanings for several operators. 
But I do not understand that D does not provide similar operators for 
free usage.

"+", "-" and all the others with fixed meaning could be prefixed for 
example by the degree symbol "°+", "°-" and provided with the same 
priorities as their unprefixed counter parts.

Thus enabling a possibly interwoven parallel expression hierarchy.

-manfred



More information about the Digitalmars-d mailing list