size_t + ptrdiff_t
Jonathan M Davis
jmdavisProg at gmx.com
Sun Feb 19 15:13:13 PST 2012
On Sunday, February 19, 2012 16:59:05 Manu wrote:
> Personally, I don't like the _t notation at all. It doesn't fit the rest of
> the D types, but it's established, so I don't expect it can change. But we
> do need the 2 missing types.
>
> There is also the problem that there is lots of code written using the
> incorrect types. Some time needs to be taken to correct phobos too I guess
For better or worse, that's what we have, and they come from C, so at least
they'll be reconizable to anyone from that realm. Honestly, I'm so used to
size_t in C/C++ that I never thought about it until someone complained about
it. It _is_ a valid point though. Still, it's too late now.
However, I _would_ point out that one major adavntage of having size_t and
ptrdiff_t named so differently from the other built-in integral types is that
all of the types using the _t convention can change their size based on the
architecture, whereas none of the others do. So, the _t shows that the size of
the type isn't fixed like most D types are.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list