Digest #138 2021-03-31
May an implementation dependent data type be variable in size?
I think, yes, it may. But it is not obvious from the text of the standard.A practical argument is that in many implementations of
ENDOF ( C: case-sys1 of-sys -- case-sys2 ) the size of
case-sys1 is not equal to the size of
Shouldn't the burden be on eForth to document that it is non-standard?
Actually # etc. use double numbers in all Forth standards. It seems to me that it's some newer minimal systems (especially with wider cells) that don't want to implement all the prerequisites of a proper double-cell # and therefore choose to change # to work on a single cell.
It's a good idea if such systems document this deviation from standard and common practice, but given that at least one user was not aware of the difference, adding a warning here may be helpful.
It would be an even better idea if these systems used different names for their non-standard words.
Another suggested implementation:
: 2OVER 3 PICK 3 PICK ;
(might be faster)
Certainly when I talk "the size of a data type", I mean the size of a data object of this data type.