isize_t?

Alex Rønne Petersen xtzgzorex at gmail.com
Sun Jan 22 03:25:25 PST 2012


On 22-01-2012 03:00, Jonathan M Davis wrote:
> On Saturday, January 21, 2012 23:07:17 Alex Rønne Petersen wrote:
>> On 21-01-2012 23:01, Andrej Mitrovic wrote:
>>> This has been discussed before on this NG (I don't have the links to
>>> the discussions, sorry!) but additional aliases will not be added.
>>> You'll have to use what you have or introduce your own aliases in your
>>> code.
>>
>> Le sigh. Consistent, standardized names would have been really nice.
>
> size_t comes from C/C++, and is exactly the same as it is in C++. In D, you
> know that if a type ends in _t, then its size can vary depending on the
> machine that you compile on, unlike all of the other primitive types.
>
> Maybe another name would have been better, but it works, and I think that most
> people who have been C/C++ programmers just don't care. The know size_t, and
> it works.
>
> At this point, given how much code would break from changing it, you would
> have to demonstrate that whatever name you came up with was really worth that
> cost, I realyl don't think that that's going to happen.
>
> - Jonathan M Davis

I wasn't suggesting changing size_t, but rather ptrdiff_t which is much 
less commonly used. (Or alternatively, just adding a ptrdiff_t -> 
isize_t alias.)

-- 
- Alex


More information about the Digitalmars-d mailing list