size_t + ptrdiff_t
Sean Kelly
sean at invisibleduck.org
Tue Feb 21 16:10:29 PST 2012
On Feb 21, 2012, at 3:50 PM, Juan Manuel Cabo wrote:
>> Eh?
>
> All the type sizes vary in broken ways in C. The only sane way
> to port C structs to D is to use c_<type> that has the size of the
> C compiler in the target platform.
>
> If there is a single C compiler has a different sized size_t
> than D's, then one has achieved nothing with the c_int, c_long, etc.
>
> So that is why it'd be nice, in my opinion, to have c_size_t
> (and c_ssize_t) if we are going to have c_int, c_long, etc.
size_t is intended to be the C representation. I very much do not want to end up with a c_size_t. Are there times when D's size_t would be a different type? Also, I wonder how much code would break if we eliminated the size_t in object.di and replaced it with Size or whatever.
More information about the Digitalmars-d
mailing list