Author: Miguel A. Ballicora
Date: 09:37:20 01/10/03
Go up one level in this thread
On January 10, 2003 at 11:10:07, Robert Hyatt wrote: >On January 10, 2003 at 05:12:04, David Rasmussen wrote: > >>On January 09, 2003 at 17:36:11, Robert Hyatt wrote: >> >>>I think the entire concept of "short", "int" and "long" are badly flawed. It >>>would >>>have been so much more logical and clean to simply go with int16, int32 and >>>int64. >>> >>>I don't personally like "long long" as it is a syntactical oddity in light of >>>char, short, int >>>and float/double. >> >>There is a reasonable explanation for this at least. The idea is that "int" >>should be whatever is the most natural entity of integer calculalation on a >>machine. In many cases, you don't care how many bits a type can store. The lower >>limits given by the standards is enough. You just want to know that by writing >>"int" you get something that on every platform is supposed to be simple, fast, >>signed (no weird problems with subtraction etc.), > >But _not_ for "real codes". Do I _really_ want to use int, when it _might_ be a >16 bit value that won't hold the counter I need? > >No. You can use long, as you say below, if you really need bigger values than the ones provided by 16 bits. I do not think this is a big deal. Miguel
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.