overloading operators for I/O

Alexander Panek a.panek at brainsware.org
Wed Feb 14 15:24:54 PST 2007


Walter Bright wrote:
> [...]
> And to sum up:
> 
>     writefln(a, b, c, d);
> 
> seems pretty intuitive to me. There's just no advantage to overloading <<.

I can just fully agree with you, though, I slightly like Tango's Cout 
better. But that's just me - used writefln back then, too.

Frankly, using '>>' and '<<' for streams may seem appropriate, but it's 
just not any kind of arrow, or such. Bit shifting is a very good use for 
those operators, though maybe they should /actually/ be bit rotating..I 
always have to think of VHS cassettes and rewind/forward, when I see the 
operator.

Best regards,
Alex



More information about the Digitalmars-d mailing list