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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f188b1cd9c1f24dc X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Parameter evaluation order Date: 1998/04/09 Message-ID: #1/1 X-Deja-AN: 342556827 Sender: news@inmet.camb.inmet.com (USENET news) References: X-Nntp-Posting-Host: houdini.camb.inmet.com Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1998-04-09T00:00:00+00:00 List-Id: Robert A Duff (robertduff@world.std.com) wrote: : ... : I'm not even convinced the tradeoff is worthwhile. That is, perhaps it : *is* a stupid rule, despite the fact that it might make some programs : run faster. I don't like nondeterministic semantics. I do. ;-). It is interesting that Djikstra in his classic book "A Discipline of Programming" chose to write it all using non-deterministic control flow constructs. This is in spite of the fact that he is very interested in proving programs correct. Implicit in this is that proving properties of programs is not necessarily harder in the presence of non-deterministic semantics. In some cases, non-determinism actually simplifies the program proving rules. Furthermore, multitasking programs are inevitably non-deterministic, and as we move to hardware where speed is achieved by increasing the number of processors rather than just the speed of individual processors, non-deterministic semantics are even more important. As an example of simplification, the rules for real model intervals in Ada are not trivial, but they are much simpler to work with than trying to reflect the exact IEEE rounding-to-nearest-even rules in attempts to prove programs. Of course the rounding-to-nearest-even has nice statistical properties, but clearly when you start relying on statistical properties, you are not talking determinism! I think the attempts to make Java's semantics deterministic were misguided. My understanding is that they have finally relented with respect to floating point calculations, and will allow extended-precision intermediates during evaluation of floating point expressions. Given that multi-tasking is a big part of Java, and they didn't even incorporate a clean race-free state-based task signaling mechanism like entry barriers, but instead use the notoriously race-prone wait/notify approach, specifying order of evaluation of parameters seems to be missing the forest for the trees. : - Bob : -- : Change robert to bob to get my real email address. Sorry. Stepping off the soapbox... -Tuck