From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ab1d177a5a26577d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!x4g2000prf.googlegroups.com!not-for-mail From: Hyman Rosen Newsgroups: comp.lang.ada Subject: Re: What's wrong with C++? Date: Wed, 16 Feb 2011 12:32:32 -0800 (PST) Organization: http://groups.google.com Message-ID: <0ce3d846-c452-4e35-8a5d-f44713a5085d@x4g2000prf.googlegroups.com> References: <1ee1a434-4048-48f6-9f5e-d8126bebb808@r19g2000prm.googlegroups.com> <4d5c105a$0$32660$882e7ee2@usenet-news.net> NNTP-Posting-Host: 204.253.252.20 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1297888352 8592 127.0.0.1 (16 Feb 2011 20:32:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 16 Feb 2011 20:32:32 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x4g2000prf.googlegroups.com; posting-host=204.253.252.20; posting-account=NhXkHQoAAADUfNLRQrjReWdGEn5uz9E_ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:17311 Date: 2011-02-16T12:32:32-08:00 List-Id: On Feb 16, 2:35=A0pm, Robert A Duff wrote: > Hyman Rosen writes: > > A second problem is that C++ leaves the order of evaluation of > > subexpressions in an expression undefined, unlike Java. > > Ada shares this flaw with C++. > > The reason is to allow the compiler to choose the most efficient order. > But I think it's possible to design a language that gets the best > of both worlds (allow that sort of efficiency, without the portability > problems). I think this reason is misguided. Most expressions do not depend on their order of evaluation, so even if the language specified the order the compiler could still rearrange things as it wished. It is for those few others where consistency rather than efficiency is most important, else programs stand the risk of working "accidentally" and then failing mysteriously due to a change in environment.