[fpc-devel] integer, cardinal
ales at chello.sk
Sun Apr 17 12:45:49 CEST 2005
Jonas Maebe wrote / napísal (a):
> On 17 Apr 2005, at 09:38, Yury B. wrote:
>>>> for 32-bit x86... or does 64-bit platform also uses 32-bit integers
>>>> as default, so that longint would be good?
>> JM> It would break a lot of existing code if we did that. You can
>> JM> define integer to be whatever you want yourself.
>> I want a kind of standard.
> I don't understand why.
>> If I don't need classes then I would prefer
>> not using objfpc or delphi mode (in order not to include huge fcl
> They don't include any fcl stuff by default. And with smartlinking
> turned on, the only extra thing you get from the objpas unit is a
> procedure called ResetResourceTables (and the ResourceStringTable
>> but i want integer to be natural to the platform.
> Even C is now moving more and more to types with a predictable size
> (see all the types in C99). I think knowing how large a type is, is
> much more important in order to create good programs than some
> perceived speed gain (especially since you can easily redefine any
> type to be whatever you want).
> fpc-devel maillist - fpc-devel at lists.freepascal.org
I think that pascal typesystem requires a bit overhaul when it comes to
First of all Integer should be size independent, that is, xy bits
depending on the platform. All others should be specific.
Second, we should "force people in a friendly way" to use more readible
sint32, uint64, etc. than "cardinal"
In a few years when 64 bits are normal, what will cardinal become? who
just one big IMHO
More information about the fpc-devel