Integer conversions too pedantic in 64-bit

Jonathan M Davis jmdavisProg at gmx.com
Wed Feb 16 10:20:25 PST 2011


On Wednesday, February 16, 2011 06:51:21 gölgeliyele wrote:
> On 2/16/11 9:45 AM, Steven Schveighoffer wrote:
> > I'm done with this thread...
> > 
> > -Steve
> 
> Ok, I don't want to drag on. But there is a reason why we have a style.
> size_t is against the D style and obviously does not match. I use size_t
> as much as Walter does in my day job, and I even like it. It just does
> not fit into D's type names. That is all.

If we were much earlier in the D development process, then perhaps it would make 
some sense to change the name. But as it is, it's going to break a lot of code 
for a simple name change. Lots of C, C++, and D programmers are fine with size_t. 
I see no reason to break a ton of code just because a few people complain about 
a name on the mailing list.

Not to mention, size_t isn't exactly normal anyway. Virtually every type in D 
has a fixed size, but size_t is different. It's an alias whose size varies 
depending on the architecture you're compiling on. As such, perhaps that fact 
that it doesn't follow the normal naming scheme is a _good_ thing.

I tend to agree with Steve on this. This is core language stuff that's been the 
way that it is since the beginning. Changing it is just going to break code and 
cause even more headaches for porting code from C or C++ to D. This definitely 
comes across as bikeshedding. If we were way earlier in the development process 
of D, then I think that there would be a much better argument. But at this 
point, the language spec is supposed to be essentially stable. And just because 
the name doesn't quite fit in with the others is _not_ a good enough reason to go 
and change the language spec.

- Jonathan M Davis


More information about the Digitalmars-d mailing list