Thou shalt have no other gods before the ANSI C standard 1648
Thou shalt have no other gods before the ANSI C standard 1650
It's a silly argument, because nobody in their right mind would use sizet for counting something like that. That is not the data type's fault. The programmer made an buttumption that whatever...
Thou shalt have no other gods before the ANSI C standard 1651
I intend to live for a long time and I do expect such a thing. It should happen when people turn holographic 3D movies into a simple business. Movie makers will want to edit...
Advantage of int64: machine-independent semantics---confidence that the int64 operations won't suddenly change behavior when they're moved to a new machine. Advantage of sizet: Nothing. The choice is clear.
Thou shalt have no other gods before the ANSI C standard 1649
That's simply not true. int64 is not machine independent at all for use as a memory index-offset. For use as a performance...
I'm ignoring the number of lines of code needed to define the types, to serialize them (what's the right printf format for sizet?), etc. Those extra lines of code are isolated, with the cost amortized over a project of any size, whereas the costs incurred by machine-dependent operations spread throughout your code increase linearly with the code size.
(It's clear that the type-definition costs favor sizet: one #include always gives you sizet these days whereas a comparably short int64.h with ``#define int64 long long'' produces complaints from the occasional Tru64 users. Handling Tru64 automatically would require some conditional compilation, such as checking whether the system provides int64t. But, again, this is an isolated cost.)
Once upon a time I had code littered with machine-dependent concepts such as sizet and offt and long and ptrdifft and uidt and timet. But I know better now. I'm amused to see C programmers saying ``if you want Java then you know where to find it'' without pausing to consider that some aspects of Java really do reduce programming costs and can be adopted by C programmers.
---D. J. Bernstein, buttociate Professor, Department of Mathematics, Statistics, and Computer Science, University of Illinois at Chicago
Alt Folklore Computers Newsgroups