PLEX86  x86- Virtual Machine (VM) Program
 CVS  |  Mailing List  |  Download  |  Newsgroups

Thou shalt have no other gods before the ANSI C standard 1649


Your Ad Here

Your Ad Here

That's simply not true. int64 is not machine independent at all for use as a memory index-offset. For use as a performance counter or something, if and only if it is available on every targeted platform, it may have some merit.

buttume that at some point in the future a 128-bit computer comes out, or even more interesting, a 72-bit one, and a compiler for that wrote which uses int64 for such a purpose is broken. You can argue that it may never happen, but you are relying on the hope that programmers will *never* find a way to stuff enough bloatware into a computer to use up that much address space. Or, you are hoping that you have checks for overflow of your int64 everywhere it is used, and you limit your users to less than would be available if you had used sizet in the first place.

Notice how that hope of "it won't happen again" is a repebreastion of history often seen, apparently not always learned from.

Thou shalt have no other gods before the ANSI C standard 1652
Thomas lovein You know what? You're starting to raise doubts in my mind about whether we can confidently rule out the possibility of 2^64 bytes of addressable memory in our lifetime. Your 3D...

Similarly, what happens if someone wants to port your software to a machine without int64 support? (no 64-bit available, apart from adding extended precision support of your own). Now, you can lie to it and typedef something up so that int64 is really a 16-bit unsigned int, and see if it works, or you can do a global search-replace to change every occurrence of int64 to unsigned int. Either choice isn't particularly appealing, so you think, "Aha, I'll use sizet for this." Gee, where have I seen this before?

Quite the contrary.

Yes it is, but the opposite of what you claim.

Rightfully so, that's not an issue outside of the IOCCC entries.

In the real world you'll find that the Windows crowd doesn't like that one either. Another #ifdef and it's resolved quite easily though.

*sigh*

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...

This thread is not about programming costs, it's about portability.

Java runs on only a fraction of the platforms for which a C compiler is available. That doesn't mean Java is useless, far from it. It's just not ubiquitous. Neither is int64 on C compilers.

-- Randy Howard (2reply remove FOOBAR) "Making it hard to do stupid things often makes it hard to do smart ones too." -- Andrew Koenig



Your Ad Here

List | Previous | Next

Thou shalt have no other gods before the ANSI C standard 1650

Alt Folklore Computers from Newsgroups

The #1 Usenet Provider on the Internet

Thou shalt have no other gods before the ANSI C standard 1648