[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Comments on David Hough's proposed ballot submissions



I also agree with dropping comparisons from the operations affected
by minWidth, or widenTo as it is (imperfectly, perhaps) defined in
draft 1.6.0 -- indeed, comparisons can be affected only by widening of
input arguments (as in K&R C), and not by the current interpretation.
(The fact that comparisons WERE listed contributed to my earlier
misunderstanding.)

Particularly to address comparison, I added some purple explanatory prose:

[ More on comparisons: 
they are special cases of the general case generic-operation( expr1, expr2) for 
arbitrary
expressions expr1 and expr2. 
A language-standard-defined expression evaluation rule, possibly modified by a
minWidth attribute, would define a type for expr1 and a type for expr2. 
If these types were the same, then the
language's generic-operation maps directly to a generic or formatOf version of 
one of this standard's operations. 
If the
types of expr1 and expr2 differ, then the language-standard-defined expression 
evaluation rule must specify how they
are mapped to a common type.
This "widening" to a common type is defined by the language standard; in 
contrast, this standard's minWidth
attribute only affects the narrowing of the exact unrounded results that were 
rounded to expr1 and expr2. 
This
standard discourages implicit "widening" to narrower formats, because of the 
propensity for programming error, and
discourages allowing mixed radices, because of the very high cost of widening 
to a common type. ]


754 | revision | FAQ | references | list archive