On 1/29/2012 4:30 PM, Jonathan M Davis wrote:
But there are
definitely arguments for having an integral type which is the most efficient for
whatever machine that it's compiled on, and D doesn't really have that. You'd
probably have to use something like c_long if you really wanted that.
I believe the notion of "most efficient integer type" was obsolete 10 years ago.
In any case, D is hardly deficient even if such is valid. Just use an alias.
C has varying size for builtin types and fixed size for aliases. D is just the
reverse - fixed builtin sizes and varying alias sizes. My experience with both
languages is that D's approach is far superior.
C's varying sizes makes it clumsy to write portable numeric code, and the
varying size of wchar_t is such a disaster that it is completely useless - the
C++11 had to come up with completely new basic types to support UTF.