Am Dienstag, 3. Oktober 2006 01:58 schrieb Karl Forner: > Hi, > > I coud not find detailed specifications for these PMCs, so I was wondering > what should happen > when they are (re)sized.
The Fixed* variants don't resize. Yes unfilled are is set to the default value. See below > For example: > a = new FixedBooleanArray > a = 3 > > So a has been (re)sized in order to be able to hold 3 elements, but what > should be the value of these elements ? 1 bit: 0 or 1 > Do they have a default value ? Yes. Boolean: 0 Int: 0 Float: 0.0 PMC: PMCNULL STRING: NULL > Should they be marked as "undefined" ? There's no storage room in e.g. *BooleanArray for that. > 'cause for now it seems that these PMCs do not implement the "defined" > interface. Should they ? Defined doesn't make much sense for native values. > A last question: > By looking in the source code, I noticed that the implementation of > get_integer_keyed_int() in ResizeBooleanArray allows negative indexes > while not in FixedBooleanArray. Is it expected ? It ought to be consistent. > Are there any specs or guidelines for that sort of stuff ? Not yet AFAIK. > > Thanks, > Karl Forner leo