<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><span class="Apple-style-span" style="font-size: medium;"><font class="Apple-style-span" color="#0000FF" face="'Gill Sans'">But my question is what are the current use-cases for LONGINT? Do they justify retaining it?</font></span></div></span></span></span></span></span></span></span></span></div></span></span>
</div>
<br><div><div>On 6 Jan 2010, at 03:01, Jay K wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>Well..to be sure to get good codegen, given that the gcc backend and every C compiler these days supports 64bit integers "directly" (to the best of their ability, sometimes function calls are involved).<br><br><br>As well, you know, to get those nice operators +, -, *, /, :=, =, <>.<br><br><br>I realize it largely comes down to a matter of "convenient builtin special syntax" vs. "user defined types and inconvenient function calls".<br><br><br>Here does lie the argument that I should be able define operators for user defined types, instead just TEXT and INTEGER and sets getting the special powers..<br><br><br>Not to mention inlining via special support in the frontend.<br>(I realize a good backend could do the same).<br><br><br>interface int64;<br><br>T = ARRAY[0..1] OF INTEGER.<br><br>PROCEDURE +(a,b:T):T;<br>PROCEDURE *(a,b:T):T;<br>PROCEDURE /(a,b:T):T;<br><br><br>?<br><br><br>etc...<br><br><br>Basically the "builtin" types are always more "convenient" than any user defined types. Only C++ as far as I know really attemps to solve that problem..<br><br><br><br> - Jay<br><br><br>________________________________<br><blockquote type="cite">From: <a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br></blockquote><blockquote type="cite">Date: Wed, 6 Jan 2010 02:11:53 -0500<br></blockquote><blockquote type="cite">To: <a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br></blockquote><blockquote type="cite">CC: <a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a>; <a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br></blockquote><blockquote type="cite">Subject: Re: [M3devel] A "radical" proposal: drop LONGINT<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">PS Any type that *requires* 64-bit could be represented as:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">ARRAY [0..1] OF BITS 32 FOR [0..16_FFFFFFFF]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">or<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">RECORD x, y: BITS 32 FOR [0..16_FFFFFFFF] END<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Is there ever a need to treat these as 64-bit integers?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 6 Jan 2010, at 02:06, Tony Hosking wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">What do you need those 64-bit types for on 32-bit machines? On 32-bit machines INTEGER would still be 32-bit.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 6 Jan 2010, at 01:12, Jay K wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Can I still have:<br></blockquote><blockquote type="cite">TYPE INT64 = BITS 64 FOR [16_8000000000000000..16_7FFFFFFFFFFFFFFF];<br></blockquote><blockquote type="cite">or<br></blockquote><blockquote type="cite">TYPE INT64 = [16_8000000000000000..16_7FFFFFFFFFFFFFFF];<br></blockquote><blockquote type="cite">? defined in an interface, not in the language?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">If so, probably ok.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">(And can I also somehow get:<br></blockquote><blockquote type="cite">TYPE UINT32 = BITS 32 FOR [0..16_FFFFFFFF];<br></blockquote><blockquote type="cite">TYPE UINT64 = BITS 64 FOR [0..16_FFFFFFFFFFFFFFFF];<br></blockquote><blockquote type="cite">or<br></blockquote><blockquote type="cite">TYPE UINT32 = [0..16_FFFFFFFF];<br></blockquote><blockquote type="cite">TYPE UINT64 = [0..16_FFFFFFFFFFFFFFFF];<br></blockquote><blockquote type="cite">?<br></blockquote><blockquote type="cite">)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Even on 32 bit machines?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I know there is interface Word.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">And then, what is the difference between:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">on 32bit:<br></blockquote><blockquote type="cite">INTEGER vs. [16_80000000..16_7FFFFFFF]<br></blockquote><blockquote type="cite">CARDINAL vs. [0..16_7FFFFFFF]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">on 64bit:<br></blockquote><blockquote type="cite">INTEGER vs. [16_8000000000000000..16_7FFFFFFFFFFFFFFF]<br></blockquote><blockquote type="cite">CARDINAL vs. [0..16_7FFFFFFFFFFFFFFF]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Any at all?<br></blockquote><blockquote type="cite">Just that array sizes are cardinal?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I don't know much about the language issues, but dealing with 64bit integers in 32bit Modula-3 ought to be about as easy and efficient as dealing with them in C and C++ I think. Hm..and why? Well..file sizes should be represented as 64bit integers, though they aren't yet..it seems to be a significant interface breaking change..though maybe range types aren't where LONGINT would be? I'll have to try that..<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">- Jay<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">________________________________<br></blockquote><blockquote type="cite">From: <a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br></blockquote><blockquote type="cite">Date: Tue, 5 Jan 2010 21:59:42 -0500<br></blockquote><blockquote type="cite">To: <a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br></blockquote><blockquote type="cite">Subject: [M3devel] A "radical" proposal: drop LONGINT<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Now that Jay has carefully refactored all the C-dependent code, I'd like to pose the following question. What say we clean things up, revert to the original clean language definition, and eliminate LONGINT? It was only ever there for compatibility with C headers anyway, and these have all now been nicely abstracted away. The only remaining uses of LONGINT are in defining Modula-3 alternatives for C structs. These can be rewritten to something other than LONGINT.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Antony Hosking | Associate Professor | Computer Science | Purdue University<br></blockquote><blockquote type="cite">305 N. University Street | West Lafayette | IN 47907 | USA<br></blockquote><blockquote type="cite">Office +1 765 494 6001 | Mobile +1 765 427 5484<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span> <span class="Apple-tab-span" style="white-space:pre"> </span> <span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span> <br></blockquote></div></blockquote></div><br></body></html>