Re: The relevant issues, was Re: Let's not BE NP-hard, shall we...?
On Aug 5 2011, Dan Zuras Intervals wrote:
From: Ralph Baker Kearfott <rbk@xxxxxxxxxxxx>
Given a particular order in which operations are done, the results of the
operations (and corresponding decorations) can be well-defined.
And this was the form of deterministic evaluation I was
proposing in my recent failed discussion in this forum.
Yes, that was clear.
In particular, I suggested that the obvious order of
operations was that which was to be found in the source
code itself with no rearrangements or optimizations at
all.
And, as I and others have pointed out, many or most standards do
not specify that is the evaluation order, so you are demanding a
change to the standards that will degrade their performance.
There is also the situation that some languages (like Fortran and
Matab) have composite 'operations' where the order of the basic
operations will affect the result, and where the order is unspecified
(either explicitly or implicitly). You are also requiring that it
be specified.
Fine. But that is a good way to get 1788 firmly rejected.
If you prefer to take the approach that you are defining derivative
languages (rather like OpenMP, but more rigorous), you have VASTLY
increased the workload and will end up with a standard that applies
to only the languages you have considered. Again, fine.
Now that's not quite true. In languages like C & Fortran
there is a tradition (specification, unspecification,
laziness, whatever) of unneeded latitude in matters of
association & the passing of parameters. Don't get me
started on side effects.
It is NOT just a tradition, and the latitude is NOT "unneeded"!
Inter alia, it can make a hell of a difference to whether the compiled
code has to store intermediate results or can keep them in registers,
and most systems are very short of registers. That optimisation has
been standard practice for at least 40 years, and probably 50.
We can try to do something about that but we can only go
so far to aid those determined to shoot themselves in the
foot.
I can relate to that :-(
Regards,
Nick Maclaren.