comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Depending on passing mechanism
Date: 1997/10/15
Date: 1997-10-15T00:00:00+00:00	[thread overview]
Message-ID: <dewar.876952904@merv> (raw)
In-Reply-To: 622b4t$nhe$1@gonzo.sun3.iaf.nl


Henry Baker <hbaker@netcom.com> replied:
 ``This is another one of those cases that give standards bodies such a
   bad name -- the behavior is well-defined as 'non-deterministic', but
   non-functional.''


Anyone who thinks that non-determinisitc = non-functional has some strqange
misconceptions. In practice, for languages designed for efficiency, you
often leave some apsects of behavior non-deterministic for very good reasons.
The case at hand is a good example. To specify call by value or call by
reference for arrays can lead to highly inefficient code in some
circumstances. Similarly, over-constraining the order of evaluation (which
affects only programs with strange side effects) can significantly damange
the efficiency of generated code.

In a later note to me (perhaps posted here I don't know), Henry commented
that the amazing Java eliminates non-determinism.

This is true, but the cost is very substantial in terms of the effect on
efficiency of generated code. For example, the requirement for absolute
adherence to IEEE would create efficiency catastrophes on machines like
the Alpha and R10000, which are very nearly IEEE compliant but not quite.
I say "would" because in practice Java implementations are quite cavalier
about such details (you may remember a student who was studying fpt
portability posting a note here that summarized his experience --
Ada good, Java terrible).

Yes, if you don't care much about efficiency you can eliminate some but
not all non-determinism (if you have tasking of some time, you cannot go
all the way to eliminating ND, though certainly Ada's annex D goes pretty
far along this route, about as far as is practical).

As for non-determinism causing lack of functionality, it is certainly
true that incompetent programmers who do not understand the language
can create non-portable programs this way, but I must say that the particular
example here is not one which seems to cause difficulties in practice.





  parent reply	other threads:[~1997-10-15  0:00 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-13  0:00 Depending on passing mechanism Andre Spiegel
1997-10-13  0:00 ` Matthew Heaney
1997-10-14  0:00 ` Robert Dewar
1997-10-14  0:00   ` Henry Baker
1997-10-15  0:00     ` Geert Bosch
1997-10-15  0:00       ` Henry Baker
1997-10-15  0:00         ` Jon S Anthony
1997-10-15  0:00         ` Robert Dewar
1997-10-16  0:00         ` Brian Rogoff
1997-10-17  0:00           ` Henry Baker
1997-10-18  0:00             ` Brian Rogoff
1997-10-18  0:00               ` Matthew Heaney
1997-10-19  0:00                 ` Brian Rogoff
1997-10-21  0:00                   ` Robert A Duff
1997-10-22  0:00                     ` Robert Dewar
1997-10-22  0:00                       ` Brian Rogoff
     [not found]                         ` <dewar.877601826@merv>
1997-10-23  0:00                           ` Brian Rogoff
1997-10-23  0:00                       ` Henry Baker
1997-10-23  0:00                     ` Brian Rogoff
1997-10-19  0:00               ` Fergus Henderson
1997-10-19  0:00                 ` Brian Rogoff
1997-10-20  0:00                   ` Fergus Henderson
1997-10-20  0:00                 ` Henry Baker
1997-10-20  0:00                   ` Tucker Taft
1997-10-21  0:00                     ` Geert Bosch
1997-10-18  0:00             ` Fergus Henderson
1997-10-15  0:00       ` Robert Dewar [this message]
1997-10-15  0:00         ` Brian Rogoff
1997-10-19  0:00           ` Robert Dewar
1997-10-22  0:00             ` Henry Baker
1997-10-15  0:00         ` Robert Dewar
1997-10-17  0:00           ` Andre Spiegel
1997-10-17  0:00             ` Henry Baker
1997-10-17  0:00               ` Robert I. Eachus
1997-10-17  0:00               ` Jon S Anthony
1997-10-21  0:00               ` Robert A Duff
1997-10-21  0:00                 ` Peter Hermann
1997-10-22  0:00                   ` Robert A Duff
1997-10-22  0:00                     ` Brian Rogoff
1997-10-22  0:00                 ` Henry Baker
1997-10-21  0:00                   ` Robert Dewar
1997-10-22  0:00                   ` Brian Rogoff
1997-10-22  0:00                   ` Jon S Anthony
1997-10-15  0:00     ` JP Thornley
1997-10-21  0:00     ` Robert A Duff
1997-10-22  0:00       ` Henry Baker
1997-10-21  0:00         ` Matthew Heaney
1997-10-22  0:00           ` Simon Wright
1997-10-23  0:00           ` Henry Baker
1997-10-23  0:00             ` Pat Rogers
1997-10-24  0:00             ` Robert Dewar
1997-10-23  0:00         ` Robert A Duff
1997-10-21  0:00   ` Keith Thompson
1997-10-14  0:00 ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox