Integer conversions too pedantic in 64-bit
Michel Fortin
michel.fortin at michelf.com
Tue Feb 15 13:49:33 PST 2011
On 2011-02-15 16:33:33 -0500, Walter Bright <newshound2 at digitalmars.com> said:
> Nick Sabalausky wrote:
>> "Walter Bright" <newshound2 at digitalmars.com> wrote in message
>> news:ijeil4$2aso$3 at digitalmars.com...
>>> spir wrote:
>>>> Having to constantly explain that "_t" means type, that "size" does not
>>>> mean size, what this type is supposed to mean instead, what it is used
>>>> for in core and stdlib functionality, and what programmers are supposed
>>>> to use it for... isn't this a waste of our time? This, only because the
>>>> name is mindless?
>>> No, because there is a vast body of work that uses size_t and a vast
>>> body of programmers who know what it is and are totally used to it.
>>
>> And there's a vast body who don't.
>>
>> And there's a vast body who are used to C++, so let's just abandon D
>> and make it an implementation of C++ instead.
>
> I would agree that D is a complete waste of time if all it consisted of
> was renaming things.
I'm just wondering whether 'size_t', because it is named after its C
counterpart, doesn't feel too alien in D, causing people to prefer
'uint' or 'ulong' instead even when they should not. We're seeing a lot
of code failing on 64-bit because authors used the fixed-size types
which are more D-like in naming. Wouldn't more D-like names that don't
look like relics from C -- something like 'word' and 'uword' -- have
helped prevent those bugs by making the word-sized type look worth
consideration?
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d
mailing list