<html><head><base href="x-msg://1376/"></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><span class="Apple-style-span" style="font-size: medium; ">On 11 Jan 2010, at 07:14, Jay K wrote:</span></div></span></span></span></span></span></span></span></span></div></span></span></div><div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">Randy I won't cover everything but on some of these matters you are not alone.<br>In particular, INTEGER and LONGINT are different types, in the current<br>implementation, and I think in all proposals.<br><br><br>It is quite striking how the current implemtation makes them completely different.<br>However many proposals do allow assignability which does make it a bit<br>blurry to a user what different types mean.<br>One thing that I bet will always remain though, is that VAR parameters of INTEGER<br>cannot "bind" to LONGINT, and vice versa.<br>The equivalent is true in C and C++: pointers to int and long cannot be interchanged,<br>without a cast, even if int and long are both 32bit.<br>That is, in C and C++, int and long are different types, just as in Modula-3,<br>INTEGER and LONGINT are different types.<br></div></span></blockquote><div><br></div><div>But C has a much looser design philosophy than Modula-3. We should not compromise Modula-3 by veering towards C.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">Which goes to show one of my agendas: C isn't as bad as people think.<br>It isn't safe, granted. There is no formal module system, but<br>people are actually usually rigorous in their use of the informal system.<br>As well, one of the goals I have espoused is that UNSAFE Modula-3 be<br>not more unsafe than C. Which is why I don't like procedures to return ADDRESS<br>and expect every caller to cast/loophole -- that is just more unsafe than things should be.<br><br><br>I have some familiarity with 8 and 16 bit integers.<br>We can perhaps claim that there is a hypothetical system<br>with 16bit INTEGER and 32bit LONGINT?<br>And that our proposals do work in such a system?<br><br><br>There is some disagreement floating around apparently on even what<br>to call the INTEGER <=> LONGINT conversions.<br>Currently ORD converts to INTEGER.<br></div></span></blockquote><div><br></div><div>I suppose ORD could convert to the underlying type, but given the intention that it be used to convert from an enumeration to an integer, then I think hardwiring it to return INTEGER is OK, since no enumeration will/should contain more elements than can be indexed by an INTEGER. On the other hand, I see no real problem if ORD(longint) returns LONGINT. It just means you have to do one more step to get an integer using VAL.</div><div><br></div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">Randy's proposal I believe converts to the underlying type: INTEGER or LONGINT.<br>And I think uses VAL(expr, INTEGER or LONGINT) to convert to INTEGER or LONGINT.<br></div></span></blockquote><div><br></div><div>Yes, this is what we also currently implement.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">I believe I saw a proposal that the converesions be named after the type:<br> INTEGER(expr), LONGINT(expr).</div></span></blockquote><div><br></div>I proposed that originally, but then decided that reusing VAL seemed much more intuitive. After all, we are asking to treat a typed expression in one domain as a *value* in some other type domain, so long as the value has a representative in that domain.<br><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">That kind of smacks to me of "too hard to search for".<br><br>Here is a crazy verbose suggestion:<br> LOOPHOLE(integer or subrange or enumeration or longint, INTEGER or LONGINT)<br></div></span></blockquote><div><br></div><div>LOOPHOLE implies an unsafe operation!</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">and allow it in safe modules?<br></div></span></blockquote><div><br></div><div>Yuck!!!!!!!!!!!!!!!!</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">At least it is existing syntax with roughly the desired meaning,<br>except that LOOPHOLE is and sounds unsafe.<br></div></span></blockquote><div><br></div><div>I vote we stick with VAL.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">CAST(expr, type)<br>CONVERT(expr, type)<br>?<br></div></span></blockquote><div><br></div><div>Yuck!</div><div><br></div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">I'm just making up words here of course.<br>VAL or ORD seem sufficient, esp. if you can specify the type.<br></div></span></blockquote><div><br></div><div>Agreed!</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; "><br>gotta go,<br> - Jay<br><br><br><hr id="stopSpelling">From:<span class="Apple-converted-space"> </span><a href="mailto:rcolebur@SCIRES.COM">rcolebur@SCIRES.COM</a><br>To:<span class="Apple-converted-space"> </span><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br>Date: Mon, 11 Jan 2010 01:11:52 -0500<br>CC:<span class="Apple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>Subject: Re: [M3devel] the LONGINT proposal<br><br><div class="ecxSection1"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Tony:</span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><i><span style="font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Sorry, I have been too long-winded here. To answer your questions succinctly: </span></i></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><i><span style="font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></i></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><i><span style="font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">1. I can relax on the<span class="Apple-converted-space"> </span><u>requirement</u><span class="Apple-converted-space"> </span>for overflow checking, but programmers should never count on it silently wrapping around.</span></i></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><i><span style="font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></i></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><i><span style="font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">2. I think checked assignability gets us onto the slippery slope (see below). Using differently named conversion operators would lesson some of the ugliness of ORD/VAL and also prevent confusion with their intended use as enumeration/INTEGER conversions.</span></i></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><i><span style="font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></i></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><i><span style="font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Read on for the long-winded version…</span></i></b></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">According to NELSON (SPwM3), ORD and VAL convert between<span class="Apple-converted-space"> </span><b><u>enumerations</u></b><span class="Apple-converted-space"> </span>and INTEGERs, and INTEGER is all integers represented by the<span class="Apple-converted-space"> </span><u>implementation</u>. So, the range of INTEGER is likely different for 8-bit, 16-bit, 32-bit, and 64-bit processors. </span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Today we see 32-bit and 64-bit processors as predominant, but I remember the day when 8-bit and 16-bit were the norm. Someday we may see 128-bit processors as the norm. </span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">(I’ve been cleaning up my basement office and ran across a box of 8-inch floppy disks. When I showed them to my daughter she understood the meaning of “floppy” as opposed to the rigid 3.5-inch floppies of today. But, I digress.)</span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">On a 64-bit processor, this whole idea of LONGINT as 64-bits then becomes mute since INTEGER will be 64 bits also. But on a 16-bit machine (assuming we had an implementation for one) the native word size would be less than the 32-bits we seem to take for granted now.</span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">One problem is that one doesn’t really know the range of LONGINT unless we define it as some number of bits. Rodney’s proposal simply stated that LONGINT was at least as big as INTEGER but could be larger. So, on a 64-bit machine, are LONGINT and INTEGER really the same in terms of implementation?, whereas on a 32-bit the LONGINT would have an additional 32-bits more than INTEGER? What about a 128-bit machine?</span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">I say all this to point out the obvious, namely that LONGINT and INTEGER are different<span class="Apple-converted-space"> </span><b><u>types</u></b>. </span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Therefore, IMO the language must make it clear how these different types interact.</span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">I would argue that</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> x: LONGINT := 23;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">is wrong! The programmer should have to write</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> x: LONGINT := 23L;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">instead.</span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">A subrange of LONGINT would be written as [23L..4200L] and would be a different type than the integer subrange [23..4200] even though the ranges are identical.</span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Likewise, IMO mixed arithmetic with the compiler deciding what to do is wrong. The programmer should have to explicitly write conversions to a common type for arithmetic.</span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">I have no problem with extending the existing operators to deal with LONGINT; it’s just that the result should be LONGINT.</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Given x: LONGINT := 49L;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> INC(x) yields 50L</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> INC(x, 3L) yields 52L</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> note that INC(x, 3) would be a syntax error since 3 is an INTEGER and x is a LONGINT</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> (x + 20L) yields 69L</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> note that (x + 20) would be a syntax error since 20 is an INTEGER and x is a LONGINT</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> LAST(LONGINT) yields a LONGINT</span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Now that I think about it more, I have a problem using ORD/VAL for the conversion since NELSON defines these as converting between<span class="Apple-converted-space"> </span><b><u>enumerations</u></b><span class="Apple-converted-space"> </span>and INTEGERs, and since LONGINT is a different type than INTEGER and quite possibly has a greater range than INTEGER. Is the proposal to also allow enumerations to use the range of LONGINT ? Enumerations currently are defined as having a range no greater than INTEGER. To extend them to LONGINT would lose the obvious performance benefits of keeping them same range as native INTEGER.</span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Maybe we should invent new names for the conversions between INTEGER and LONGINT. Perhaps PROMOTE and DEMOTE or some such. These are probably bad names, but I use them below simply to illustrate (feel free to come up with better names):</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> Given longInt: LONGINT; and int: INTEGER;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> int := DEMOTE(longInt); would perform the conversion from LONGINT to INTEGER and would give a runtime range check error if longInt is too big/small to fit in an INTEGER.</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> longInt := PROMOTE(int) would always succeed in performing the conversion from INTEGER to LONGINT but would make the conversion explicit</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> int + DEMOTE(longInt) would yield an INTEGER result with all arithmetic being done in the range of INTEGER</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> longInt + PROMOTE(int) would yield a LONGINT result with all arithmetic being done in the range of LONGINT</span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Now if we were to allow checked assignability (as Tony is leaning toward), I think we begin to get on the slippery slope. How far do we extend this to the point that it is not clear in the expression of the code what is happening? If I can write “int := longInt;” why not “int := 23L;” and why not “int := longInt + 57;” and is this different than “int := longInt + 57L;”? etc. etc.</span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">I agree the ORD/VAL syntax is ugly, so that is another reason (besides them applying to enumerations only) we should use different names for the INTEGER/LONGINT conversions.</span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><span style="font-size: 14pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Sorry, I have been too long-winded here. To answer your questions succinctly: </span></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><span style="font-size: 14pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><span style="font-size: 14pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">1. I can relax on the<span class="Apple-converted-space"> </span><u>requirement</u><span class="Apple-converted-space"> </span>for overflow checking, but programmers should never count on it silently wrapping around.</span></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><span style="font-size: 14pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><span style="font-size: 14pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">2. I think checked assignability gets us onto the slippery slope. Using differently named conversion operators would lesson some of the ugliness of ORD/VAL and also prevent confusion with their intended use as enumeration/INTEGER conversions.</span></b></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Regards,</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Randy Coleburn</span></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span></p><div><div style="border-top-style: solid; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-width: 1pt; border-right-width: medium; border-bottom-width: medium; border-left-width: medium; padding-top: 3pt; padding-right: 0in; padding-bottom: 0in; padding-left: 0in; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">From:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><span class="Apple-converted-space"> </span>Tony Hosking [mailto:hosking@cs.purdue.edu]<span class="Apple-converted-space"> </span><br><b>Sent:</b><span class="Apple-converted-space"> </span>Sunday, January 10, 2010 3:43 PM<br><b>To:</b><span class="Apple-converted-space"> </span>Randy Coleburn<br><b>Cc:</b><span class="Apple-converted-space"> </span>m3devel<br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [M3devel] the LONGINT proposal</span></div></div></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> </p><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Hi Randy,</div></div><div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> </p></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">As someone who has actually written Modula-3 programs for a living your opinions are always highly valued. I agree with you in principle and aims, except for requiring overflow to be a checked run-time error. The language definition already has a mechanism for handling this in the require FloatMode interface. It is not something that the compiler should be involved in. I also just now raised a question about perhaps having integer literals adapt their type to the context in which they are used.</div></div><div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> </p></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">I should point out that the current mainline implementation does exactly what you propose (except overflow checking). It captures the fundamental spirit of Rodney's proposal but does not permit mixed arithmetic or assignment. Can I ask what your issue is w.r.to checked assignability? I am still leaning in favor. It is not much different from assignment from an INTEGER to a subrange, which requires no explicit check, though of course there is a run-time range check. Having programmers explicitly write:</div></div><div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> </p></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span class="ecxapple-style-span"><span style="font-size: 9pt; font-family: Courier; ">x: INTEGER := ORD(longint, INTEGER);</span></span></div></div><div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> </p></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">seems unnecessary when they could just write</div></div><div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> </p></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span class="ecxapple-style-span"><span style="font-size: 9pt; font-family: Courier; ">x: INTEGER := longint;</span></span></div></div><div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> </p></div><div><div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span class="ecxapple-style-span"><span style="font-size: 13.5pt; font-family: Helvetica, sans-serif; color: black; ">This is similar in spirit to:</span></span><span style="font-size: 9pt; font-family: Helvetica, sans-serif; color: black; "></span></div></div></div></div><div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> </p></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><span class="ecxapple-style-span"><span style="font-size: 9pt; font-family: Courier; ">x: [lo..hi] := integer;</span></span></div></div><div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> </p></div><div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> </p></div><div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">On 10 Jan 2010, at 15:00, Randy Coleburn wrote:</div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">I've been trying to follow along on this topic.<br><br>Here are my thoughts:<br><br>1. LONGINT should be a distinct type different from INTEGER.<br><br>2. There should be no mixed arithmetic between the types. The programmer must code conversions using ORD/VAL to make explicit the intention. Don't rely on some ill-remembered built-in conversion rule.<br><br>3. Overflow should be a checked run-time error, not silently wrapped around.<br><br>4. WRT assignability, I think explicit conversions should be used.<br><br>These statements may make me unpopular with some who don't like to type much, but I've always hated the tradeoff of understandability for brevity in expression.<br><br>The important thing is not how fast we can type up a program, it is rather how hard is it to make a mistake. I think the spirit of Modula-3 is that the language makes you a better programmer by forcing you to make your intentions explicit rather than relying on the compiler to infer your intentions. We need correct and maintainable software, especially at the systems level. Whatever is decided about LONGINT, we need to keep to the original design tenants of the language. <br><br>And yes, I do think we need a LONGINT type, not just to deal with large file sizes.<br><br>But even for long-lived readers/writers, whatever type you choose for the index will eventually be insufficient, so you have to code for the possibility that the range of the long lived reader/writer exceeds the range of your index type. That is just good programming.<br><br>I think sometimes that the new generation of programmers has been warped by what I call the "Microsoft Mentality" where you must expect that you need to reboot/restart every so often to maintain proper performance. Programs should be written to run forever or until their job is completed or they are commanded to stop. <br><br>As "we" begin to converge on the design changes, I like having something concrete to look at, ala Rodney's proposal. Can we take that and keep tweaking it in these emails until we reach a final version acceptable to all? To me this keeps the discussion focused rather than the many different emails. Thus, what I am trying to say is put forth a numbered proposal and each subsequent email must show adjustment to that proposal rather than just a bunch of emails discussing various aspects. Perhaps we should vote on each proposed change, then decide to call a final vote on the whole thing. Who should be involved in such votes? Right now the main persons on the thread are Tony, Jay, Rodney, Mika, Hendrik, Olaf, John, and me.<br><br>My two cents.<br><br>Regards,<br>Randy Coleburn</div></div></div><p class="ecxMsoNormal" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.5in; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> </p></div></div></span></blockquote></div><br></body></html>