[M3devel] Enumeration or subrange value out of range
Michael Richter
ttmrichter at gmail.com
Wed Dec 1 06:45:34 CET 2010
On 1 December 2010 01:18, Jay K <jay.krell at cornell.edu> wrote:
> In the case of templates leading to some meta programming, it was an
> accident.
> But in the case of operator overloading it seems just goodness.
>
I am badly conflicted in the case of operator overloading. In its favour we
have:
- more succinct code that clearly states intent (when overloaded
properly)
- opportunities to optimize calculations (like your example with
intermediate forms for matrix manipulations)
Countering that favour, however, we have:
- idiots redefining operators in ways that are emphatically *not* proper
in terms of semantics (operator<< and operator>> being obvious cases, but
also operator+ for concatenation and some of the ... utterly painful uses
for operator,)
- the inability to define *new* operators (which leads to the first
problem of idiots redefining the semantics of operators)
- unexpected costs to operations making the eyeballing of execution
complexity (time-wise and memory-wise) literally impossible
- painful interaction with templates that makes a perfect storm of
eye-damaging syntax
--
"Perhaps people don't believe this, but throughout all of the discussions of
entering China our focus has really been what's best for the Chinese people.
It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20101201/e1a61fcf/attachment-0001.html>
More information about the M3devel
mailing list