Integer conversions too pedantic in 64-bit
    spir 
    denis.spir at gmail.com
       
    Tue Feb 15 12:54:11 PST 2011
    
    
  
On 02/15/2011 08:05 PM, Walter Bright wrote:
> foobar wrote:
>> 1. that size_t is inconsistent with D's style guide. the "_t" suffix is a C++
>> convention and not a D one. While it makes sense for [former?] C++
>> programmers it will confuse newcomers to D from other languages that would
>> expect the language to follow its own style guide.
>
> It's a C convention.
>
>> 2. the proposed change is backwards compatible - the OP asked for an
>> *additional* alias.
>
> I do not believe that value is added by adding more and more aliases for the
> same thing. It makes the library large and complex but with no depth.
If we asked for various aliases for numerous builtin terms of the language, 
your point would be fully valid. But here is only asked for a single standard 
alias for what may well be the most used type in the language; which presently 
has a obscure alias name.
Cost: one line of code in object.d:
     alias typeof(int.sizeof)                    size_t;
     alias typeof(int.sizeof)                    Abcdef; // add this
As an aside, the opportunity may be taken to use machine-word-size signed 
values as a standard for indices/positions and sizes/counts/lengths (and 
offsets?), everywhere in the language, for the coming 64-bit version. Don, 
IIRC, and Bearophile, referred to issues due to unsigned values.
This would also give an obvious name for the alias, "Integer", that probably 
few would contest (hope so).
Denis
-- 
_________________
vita es estrany
spir.wikidot.com
    
    
More information about the Digitalmars-d
mailing list