<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Ryan, Tobias, All,</div><div><br>On May 8, 2016, at 10:28 AM, Ryan Macnak &lt;<a href="mailto:rmacnak@gmail.com">rmacnak@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><span></span></div></blockquote><blockquote type="cite"><div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 7, 2016 at 7:49 AM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><br>
<br>
&gt; On May 6, 2016, at 10:41 PM, Tobias Pape &lt;<a href="mailto:Das.Linux@gmx.de">Das.Linux@gmx.de</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;&gt; On 07.05.2016, at 00:20, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; On May 6, 2016, at 1:37 PM, <a href="mailto:commits@squeakvm.org">commits@squeakvm.org</a> wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Revision: 3704<br>
&gt;&gt;&gt; Author:&nbsp; &nbsp;nice<br>
&gt;&gt;&gt; Date:&nbsp; &nbsp; &nbsp;2016-05-06 13:37:49 -0700 (Fri, 06 May 2016)<br>
&gt;&gt;&gt; Log Message:<br>
&gt;&gt;&gt; -----------<br>
&gt;&gt;&gt; converting int to pointer is 64bits risky, better use long even for dummy<br>
&gt;&gt;<br>
&gt;&gt; It isn't risky, it's broken :-)<br>
&gt;<br>
&gt;<br>
&gt; What about intptr_t then?<br>
<br>
</span>Rejected because it's a pretentious neologism, and because it's not a basic type. long however, is a basic type, is big enough to hold a pointer, is not pretentious, and is, in fact what intptr_t is defined in terms of anyway.<br></blockquote><div><br></div><div>Not on all platforms, which is why intptr_t exists. long is only required to be at least 32 bits, not to be wide enough to hold a pointer. Windows is an LLP64 system.</div></div></div></div></div></blockquote><div><br></div>Ugh. &nbsp;Well that holes my argument below the water line. &nbsp;No point going into outrage over what an awful decision Microsoft took, and ignorant of me (but sizeof(long) is now a real problem in Slang :-( ). &nbsp;But it seems to me we still have choices:<div><br></div><div>1. declare all platform function arguments that take pointers as taking void *</div><div>2.&nbsp;<span style="background-color: rgba(255, 255, 255, 0);">declare all platform function arguments that take pointers as taking intptr_t</span></div><div>3.&nbsp;<span style="background-color: rgba(255, 255, 255, 0);">declare all platform function arguments that take pointers as taking sqInt</span></div><div><br></div><div>My preference is 1. &nbsp;I really dislike the proliferation of specialized integer types such as intptr_t and size_t. They're neologisms and as such may not be supported in some platforms (I'm still using gcc 3.4 on win32 cuz the last time I tried to update Cygwin to something that supported both 32- &amp; 64- bits it broke 32-bit compilation in the mingw32 platform includes). &nbsp;Further, they complicate the type inferrence machinery</div><div><br></div><div>3. doesn't work for the "legacy" 64-bit VM, which supports mixed mode compilation, 64-bit oops on 32-bits (sqInt bigger than needed to represent a pointer) and 32-bit oops on 64-bits&nbsp;(sqInt smaller than needed to represent a pointer).</div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">1. calls a spade a spade. &nbsp;I prefer 1. &nbsp;Yes, both sides have to cast to get integral values but it declares the intent, to pass a pointer, better than intptr_t IMO.</span></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">Thoughts, other ideas?</span></div><div><br><div><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
If we have to add support for all the possible renaming a if the basic integer types in the type inference machinery we'll have numbers in the double digits.&nbsp; KISS.<br>
<br>
<br>
&gt;<br>
&gt; Best regards<br>
&gt;&nbsp; &nbsp; -tobias<br>
</blockquote></div><br></div></div>
</div></blockquote></div></div></body></html>