Re:Running Forth Unikernels
by upofadown on Monday April 01, 2019 @05:32PM
(#19548506)
It gets philosophical fast, but something like a stack underflow error is a feature of the interpreter. It is not a part of the language itself. A misbehaving Forth program will happily underflow through all of memory.
[ Parent
| on HN ]
Re:Running Forth Unikernels
by MaxBarraclough on Tuesday April 02, 2019 @05:32PM
(#19558787)
According to the language spec, it seems to be non-compliant to handle stack overflow that way (even if it's obviously a good feature):
> In all integer arithmetic operations, both overflow and underflow shall be ignored. The value returned when either overflow or underflow occurs is implementation defined.
I think they mean arithmetic overflow and underflow.
Re:Running Forth Unikernels
by MaxBarraclough on Wednesday April 03, 2019 @06:40PM
(#19567826)
Oops! Second attempt: looks like they single out "stack underflow" as implementation-defined behaviour:
> A system shall document the system action taken upon each of the general or specific ambiguous conditions identified in this Standard.
So, essentially the opposite of what I said.