Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Re: Operator overloading a mistake??

Thread Tools

Re: Operator overloading a mistake??

Peter van Merkerk
Posts: n/a
> Well, for starters the entire iostream library is based on operator
> overloading.

I'm well aware that the standard library, including the iostream
library, uses operator overloading, as do many other libraries. But that
doesn't prove your point. AFAIK it is possible implement a library with
the same functionality without operator overloading. No doubt such a
library would have a very ugly syntax.

With syntactic sugar I mean language features that make it easier/more
natural to use certain functionality, functionality that could also be
invoked in another (less convient) way. That doesn't make syntactic
sugar a bad thing, not at all. Operator overloading is a good thing, but
there is nothing magical about it, it is just a useful language feature.

Peter van Merkerk

Reply With Quote
Victor Bazarov
Posts: n/a
"cody" <(E-Mail Removed)> wrote...
> [...]
> you can OVERLOAD the comma operator? how does that work and what purpose
> does it serve?

Please use the archives to find relevant discussions. This topic
has been entertained more than enough.


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
overloading operator->*() and operator->() C++ 2 02-21-2009 04:26 AM
overloading operator->*() and operator->() C++ 11 02-20-2009 08:52 PM
user defined conversion operator or operator overloading? hurcan solter C++ 3 08-29-2007 07:39 PM
Why is overloading operator. (member operator) forbidden? C++ 11 05-16-2007 07:54 PM
Operator overloading on "default" operator John Smith C++ 2 10-06-2004 10:22 AM