[net.lang.c] Ambiguity

chris@umcp-cs.UUCP (Chris Torek) (10/08/86)

In article <3773@ism780c.UUCP> marv@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@umcp-cs		ARPA:	chris@mimsy.umd.edu