<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><font class="Apple-style-span" color="#0000FF" face="'Gill Sans'"><span class="Apple-style-span" style="font-size: medium;">My firm position now is that we continue to disallow both mixed arithmetic *and* assignability, and stick with the status quo as described at:</span></font></div></span></span></span></span></span></span></span></span></div></span></span>
</div><div><br class="webkit-block-placeholder"></div><div><a href="http://www.cs.purdue.edu/~hosking/m3/reference/index.html">http://www.cs.purdue.edu/~hosking/m3/reference/index.html</a></div><div><div><a href="http://www.cs.purdue.edu/homes/hosking/m3/reference/complete/m3-defn-complete.pdf">http://www.cs.purdue.edu/homes/hosking/m3/reference/complete/m3-defn-complete.pdf</a></div></div>
<br><div><div>On 11 Jan 2010, at 19:18, Rodney M. Bates wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Well, I have been mistaken.  I finally found the statement about argument<br>types of builtin operators.  Every time I go looking for this, I have trouble<br>finding it.  I had remembered it wrongly.  It does not say an actual argument must<br>be assignable to the type in the signature, it says it must be a _subtype_<br>of the type in the signature.  Actually, it says the overloading is resolved<br>using the subtype relation, but this has the same effect on what is and<br>isn't statically legal.<br><br>(2.6.1):  The particular operation will be selected so that each actual<br>          argument type is a subtype of the corresponding formal type or<br>          a member of the formal type class.<br><br>So mixed INTEGER/LONGINT arithmetic does _not_ fall out of the existing<br>rules.  We would have to insert 4 different overloaded signatures for<br>+, etc. to allow the mixed arithmetic.  Either way, it makes specifying the<br>language changes for LONGINT a lot simpler.<br><br>This weakens my support of mixed arithmetic.<br><br>However, there is still some messiness to be resolved.  The relations do use<br>assignability rather than subtyping, in such a way that mixed comparisons<br>do fall out of the existing rules.  (The overload resolution is done on<br>type class, not type, and doesn't, by itself, preclude mixed INTEGER/<br>LONGINT comparisons.)  Then there are a lot of other places<br>that use assignability.  They are:<br><br>- assignment statements<br>- passing parameters to VALUE or READONLY formals<br>- passing VAR open array parameters (a different kind of assignability, not<br>     really relevant)<br>- RAISE statements<br>- RETURN statements<br>- Initial value assignment in a VAR declaration<br>- array subscripts in designators a[i]<br>- elements of set, array, and record constructors<br>- relational operators, including IN<br>- ISTYPE and NARROW (reference types only, thus irrelevant to INTEGER/LONGINT)<br><br>I too am generally a fan of syntactic explicitness, rather than having things<br>happen behind the scenes, without the programmer's coding them.  But if we<br>disallow mixed arithmetic operations, it seems to me that it becomes<br>quite arbitrary where we are allowing assignability and where we are<br>requiring explicit type conversions.<br><br>Without LONGINT in the picture, this arbitrariness didn't happen, because<br>there was no case where assignability vs. subtyping for the arguments of<br>the arithmetic operators made any difference.<br><br>I do think it would be particularly inconsistent to disallow the mixed<br>arithmetic but allow mixed relations.  As Tony has pointed out, these<br>two differ from the other uses of assignability in having two expressions<br>whose types must be used to infer a common value range to do the operation<br>in.  All the other uses of assignability have only one "target" type to<br>assign to.<br></div></blockquote></div><br></body></html>