Re: mixed-sign arithmetic and auto
Pete Becker wrote:
Java's success was largely the result of having a marketing department.
While a great marketing department is certainly helpful, it is a serious
mistake to dismiss Java that way (at least for a language designer, it is).
I regularly talk to heavy Java developers, with the aim of finding out
what works and what doesn't work for them. The same goes for C++. I even
talk with the Lisp guys when I can find one!
Naive programmers believe their claims that tightening the rules makes
programming far easier, despite the absence of concrete evidence.
Given the code in C++ and Java:
a = foo() + bar();
which one would I have to rewrite as:
tmp = foo();
a = tmp + bar();
if there is an order of evaluation issue? How would I reliably detect
such an issue in the C++ version (putting on my QA hat)?
From a QA standpoint, it's clearly easier to verify the Java version
than the C++ one. foo() is evaluated first, then bar(). That's easier to
deal with than hmm, which one happens first, and when might that change,
and do I have any order dependencies here?
Java does have a predictability issue with the gc, but that is separate
from integer, OOE, etc., issues.
--------
Walter Bright
http://www.digitalmars.com
C, C++, D programming language compilers
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]