From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Thu, 22 Nov 2012 05:21:52 -0500 To: 9fans@9fans.net Message-ID: <52369c6626d4245fb56cebedb438801a@kw.quanstro.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] go forth and ulong no more! Topicbox-Message-UUID: de284b82-ead7-11e9-9d60-3106f5b1d025 On Thu Nov 22 04:03:29 EST 2012, charles.forsyth@gmail.com wrote: > usize is indeed the same size as uintptr. > Instead of either for purely integer values, it would be better to > make all integers 64 bit, and use uint and int (for pointer > differences), > but that causes other problems, at the moment. >=20 > On 22 November 2012 03:44, Bruce Ellis wrote: > > i'd like an example of where usize wins, as it has to be same as uint= ptr my reading of various standards says that usize doesn't need to be the same size as uintptr, since the implementation could limit the address space used to smaller than could be addressed by the full pointer range. and in fact due to the inbetween state of things, usize is 32-bits on nix. i see the strategy as first ulong=E2=86=92usize, then redefine usize. i agree that that's gross. if we got rid of usize, the type signature of malloc would be void *malloc(uintptr) which i think is quite confusing. imo, types should be as self- documenting as possible. =20 - erik