On 02/20/12 00:17, Manu wrote: > On 20 February 2012 01:10, kennytm <[email protected] > <mailto:[email protected]>> wrote: > > Manu <[email protected] <mailto:[email protected]>> wrote: > > I propose size_t + ssize_t should both exist, and represent the native > > integer size. > > sizediff_t (currently just aliased to ptrdiff_t but the link could be > broken). > > > Also something like ptr_t, and ptrdiff_t should also exist, > > and represent the size of the pointer. > > > > core.stdc.stdint.uintptr_t > > > O_o .. how is this different to size_t now? Why the redundant alias?
C compatibility? It is redundant in D, at least until it supports non-flat address spaces. :^) uintptr_t can hold a pointer, size_t only the size of something. These days there's usually not much difference, but take eg x86_16 segments - you can have several 'views' into memory, that allow for <= size_t-sized objects, but a full 'address' of such an object won't fit into a size_t. artur
