bikeshedding: sizediff_t -> size_s ?

Francisco Almeida francisco.m.almeida at gmail.com
Tue May 10 03:38:23 PDT 2011


I think adopting ssize_t, thus improving parity with C would be more 
reasonable than a size_s that can be easily mistaken for size_t when 
reviewing long code.

Either way, sizediff_t isn't used that often anyway, so I don't know if 
this minor issue should take too much priority.

On 10-05-2011 07:28, KennyTM~ wrote:
> On May 10, 11 11:57, Andrej Mitrovic wrote:
>> I've noticed this thread a while ago:
>> http://thread.gmane.org/gmane.comp.lang.d.phobos/3881/focus=3885
>>
>> Maybe it's way too late for any changes, but I think sizediff_t is a
>> mouthful. Doesn't size_s look nicer? It would be size_t's evil twin
>> brother, look:
>>
>> size_s imSoNegative;
>> size_t neverADowner;
>
> -sizediff_t.max
>
> The meaning of _t and _s suffix on types in C mean "type" and "struct"
> respectively, the latter never mean "signed". Using a C convention for a
> totally different meaning is going to confuse people. Further more, the
> difference between 'size_t' and 'size_s' is too small visually.
>
> BTW, the signed version of size_t in C (POSIX) is called 'ssize_t'.
>
> </bikeshed>



More information about the Digitalmars-d mailing list