On 21 January 2014 14:21, Jeffery, Clint (jeffe...@uidaho.edu) <
jeffe...@uidaho.edu> wrote:

>
> Ralph Griswold would say that referential transparency is important, and
> that not knowing whether the expression x+y has
> anything to do with addition would make code less readable and
> maintainable.  The Java language designers apparently agreed, eschewing the
> overloading that C++ took on in order to try and kill Ada.
>

Um, except for string concatenation, which overloads '+' and '+=' in Java...

If you allow any overloading, you can always make bad choices.

For the most part, operator overloading in C++ either (a) fits the domain
at hand and makes code more readable and maintainable, or (b) is done
because you cannot define arbitrary syntaxes (such as various expression
template based libraries like Boost.Spirit and Boost.Lambda).


> Personally, I am ambivalent, wanting classes to be able to define new
> types that feel just as native as built-in types, but somewhat sympathetic
> to Griswold's point of view.
>

Just providing a data point,
 Nevin :-)
-- 
 Nevin ":-)" Liber  <mailto:ne...@eviloverlord.com>  (847) 691-1404
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to