Discussion on:

Message 8 of 19
0 Votes
+ -
Impl. Operator Overloading is for Library Designers -- not App Programmers
Implementing Operator Overloading is for Library Designers -- not Application Programmers.

This is as it should be. Application programmers should *not* be implementing operator overloading, that's a task for library designers. Division of labor is there for a reason.

I like how this separation between language features and their target audiences is made clear and explicit for Scala by its designer, Martin Odersky:
http://www.scala-lang.org/node/8610

It's worth noting that both Scala and C++ are multiparadigm programming languages, comparing them with uniparadigm (or very-few-paradigm ;]) ones makes little sense.

Incidentally, Scala goes even further as far as operator overloading is concerned:
http://weblogs.java.net/blog/cayhorstmann/archive/2011/12/06/operator-overloading-considered-challenging

Is this a problem? No. Was this ever a problem? Not at all. Multiparadigm programming languages useful *both* for library designers *and* application programmers have their place, division of labor is an inherent feature of the modern life happy

One more note from the Scala's perspective:
"In Java, you cannot overload operators, and the Java designers claimed this is a good thing because it stops you from inventing crazy operators like !@$&* that would make your program impossible to read. Of course, thats silly; you can make your programs just as hard to read by using crazy method names like qxywz. Scala allows you to define operators, leaving it up to you to use this feature with restraint and good taste."
happy
Posted by nchmch
1st Feb