Ambiguity
Chris Torek
chris at umcp-cs.UUCP
Wed Oct 8 15:31:28 AEST 1986
In article <3773 at ism780c.UUCP> marv at ism780c.UUCP (Marv Rubenstein) writes:
>And now a question. Is it reasonable to design a language (advertised as
>portable) that has ambiguous semantics?
Certainly.
The tighter the semantics, the harder it is to write good compilers
for different machines. The looser the semantics, the harder it
is to write portable code. Extreme examples (in both directions)
are easy to construct. What, e.g., are the *precise* semantics of
a floating point add? What happens if I add 1E-20 to 1E+20? 1E-10
to 1E+10? 1E-1 to 1E+1? Exact semantics here virtually requires
the complete specification of floating point format. On the other
hand, who would want to use a C-like language where `long' is
required only to range from -128 to +127?
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516)
UUCP: seismo!umcp-cs!chris
CSNet: chris at umcp-cs ARPA: chris at mimsy.umd.edu
More information about the Comp.lang.c
mailing list