[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: Clause 10, Expression Evaluation
Each programming languages shall specify one or more rules for expression
evaluation. A rule for expression evaluation specifies:
. the order of evaluation of operations,
What if it doesn't?
The oldest and most successful numeric programming language standard does
not now, to my knowledge has not for 30 years, and to my belief never.
Furthermore, it is not useful. To echo/paraphrase Nick Maclaren,
"Why waste time debugging a program you are NOT going to run in production."
It's like crash-testing a VOLVO to see whether it's safe to drive a PORSCHE.
The utter futility and waste of time is probably
beyond my capability to express fully.
FORTH and all other stack-based languages (most Virtual Machines are
stack-based, too) have a strict and rigid rule of expression evaluation:
the stack order.
So these languages can be debugged exactly the way they run in
full-speed mode: You CAN crash-test a certain kind of VOLVO to
verify that the PORSCHE from the same firm run faultless.
You can run them in a debugger; there are even omnisicient debuggers
in Java or OCaml where you can move forward and backward in time from
a breakpoint and inspect the values. Claiming that such an ability
isn't useful....words are failing me.
You are right that there are languages where strict order rules
don't exist and that these languages are still rampant in numerical
computation. You are also right that for these languages debugging
in debug mode may be effectively futile because you don't know how
the optimizing compiler mangles your code (I have one friend who
run into this problem and wasn't able to solve it). So you are right in
criticizing the proposal to define strict expression evaluation
if there are languages who violate this rule by default.
But it does NOT justify your sweeping generalization ("It is not
useful","utter futility","waste of time") from this point if you
don't say exactly *what* is "utter futile" !
The proposal itself ? Starting bureaucracy, defining the proposal
and waste paper ? Having a language who has strict expression
evaluation ? Debugging in debug mode at all ?
Regards,
Thorsten