|
![](/i/fill.gif) |
In article <4038aea6$1@news.povray.org>, "Tek" <tek### [at] evilsuperbrain com>
wrote:
> that person should be dragged out into the street and shot*. So, ON THAT
> PREMISE, if you have decided to write an inline function there will be an
> "overhead of it being a function (i.e. several instructions) rather than a
> simple instruction", by which I mean you have decided to write a function
> that is more than one instruction.
__normal_iterator& operator++() { ++_M_current; return *this; }
That's the ++ operator for one of the STL iterators. And it does make
sense to do it this way...other operators have to do more complex
things, but it still makes sense to have a ++ operator.
> What I'm saying is, quite simply, we like to make a distinction
> between "+" and any more elaborate function. Because doing so
> prevents people writing lines like a = b + 3*(c-d), which looks
> perfectly innocent, but could be a major bottleneck.
All the coder has to do is look at the types being worked on. And this
still isn't an argument against the existance of operator overoading.
> We like the clunkier syntax *because* it is harder to use and requires more
> thought from the programmer. In our situation this is a good thing.
But it requires more thought about the wrong things...I don't see how it
can help.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tag povray org>
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |