Re: overload operator<<



Rick Elbers <rick.elbers@xxxxxxxxx> wrote:
> Your reaction about confusing symbols is understandable I think, what
> I dont understand is the hidden agressive part. In my experience with
> c++ I have had never any problem with the overloaded meaning of
> operator << and >>.

I guess I am a bit overzealous about it, just because readability is
such a big issue for me - and when symbols don't have clearly defined
meanings, readability goes down.

I dare say it's hard to remember, but do you know what your reaction
was the *first* time you saw the bitshifting operators being used for
something other than bitshifting.

Suppose someone didn't follow the accepted naming conventions for the
environment they're working on. It's not an immediate *problem* as such
- it doesn't make things completely unreadable - but it just makes
everything that *little* bit harder.

> Like most truths in a human world its overloaded with respect to some
> context. I dont understand why your c# spec is the wholy grail when
> compaired to a completely vendor independent c++ language spec and
> comite.

There are certainly things wrong with C# too - but I think it was the
right decision to keep bitshifting operators as just that. There are
many ways in which C++ is a real pig to read, IMO, and I think C# has
improved things significantly on that front. One of the contributing
factors to that is the restrictions on what can be overloaded where.

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
.