Digest #138 2021-03-31
Contributions
requestClarification - Size of implementation dependent data types
May an implementation dependent data type be variable in size?
For example, may the size of colon-sys from :
be unequal to the size of colon-sys from :NONAME
?
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 case-sys2
.
Replies
comment - Note incompatability (double v single) with some older Forth's.
Shouldn't the burden be on eForth to document that it is non-standard?
comment - Note incompatability (double v single) with some older Forth's.
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.
referenceImplementation - Suggested reference implementation
Another suggested implementation:
: 2OVER 3 PICK 3 PICK ;
(might be faster)
requestClarification - Size of implementation dependent data types
Certainly when I talk "the size of a data type", I mean the size of a data object of this data type.