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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a00006d3c4735d70 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-30 13:36:05 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!nnx.oleane.net!oleane!teaser.fr!usenet-fr.net!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "Alexandre E. Kopilovitch" Newsgroups: comp.lang.ada Subject: Re: In-Out Parameters for functions Date: Sat, 31 Jan 2004 00:31:45 +0300 (MSK) Organization: Cuivre, Argent, Or Message-ID: References: <1075482385.142744@master.nyc.kbcfp.com> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: melchior.cuivre.fr.eu.org 1075498459 18221 80.67.180.195 (30 Jan 2004 21:34:19 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Fri, 30 Jan 2004 21:34:19 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: In-Reply-To: <1075482385.142744@master.nyc.kbcfp.com>; from Hyman Rosen at Fri, 30 Jan 2004 12:06:26 -0500 X-Mailer: Mail/@ [v2.44 MSDOS] X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.3 Precedence: list List-Id: Gateway to the comp.lang.ada Usenet newsgroup List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:5124 Date: 2004-01-31T00:31:45+03:00 Hyman Rosen wrote: > I believe that once code is written, tested, and found to work, then > having the evaluation order chosen by the language means that it will > continue to work even when the environment changes. If the order is > selected by the compiler, then you have no such assurance. Surely > this is obvious? You must be surprised, but the right answer is "generally, NO". The situation depends on kind of applications for which the language is aimed. When you rely upon fixed (in the language) evaluation order you are risking to make things non-commutative. And if those things are commutative in the underlying theory then you are subjected to unexpected failure when some part of your "environment" changes. And if evaluation order is fixed in the language then you lose an opportunity to caught that potentially dangerous non-commutativity by testing with various compilers and various optimization levels. Moreover, those failures that happen because of this difference - between a theory, which is based on commutativity, and a non-commutative implementation, may be extremely hard to investigate, just because the reason is located neither in theory nor in software implemention, but somehow between them. So, by fixing order of evaluation you enhance the overall situation for theoretically trivial applications, but worsen it for applications that are substantially based on non-trivial mathethical/physical theories. So, both decisions - to fix evaluation order in Java and not to do that in Ada - are right, these languageas are extreme cases: Java is used primarily for theoreticaly trivial applications, while Ada is often used for applications, based on mathematically non-trivial theories. > Nevertheless, in conventional programming languages overspecification > is the rule, and it is what programmers are used to. That's true about commodity, but Ada language too often is used for programming things that aren't commodities in any reasonable sense, and this is Ada's native land. Ada isn't a popular language, can't be, and don't strive to be too popular; what is desired is to get as much as possible of proper audience, but not much more. Alexander Kopilovitch aek@vib.usr.pu.ru Saint-Petersburg Russia