Digest #195 2022-08-19
After a recent ForthHub discussion Is QUIT expected to THROW? the following question arises.
In the presence of the following facts:
QUITis not updated in the Exception word set
QUITempties the return stack, but doesn't empty the exception stack.
THROWrestores depth of the return stack when there is an exception frame on the exception stack.
How the code
:noname ['] quit catch . ." test-passed "; execute should work if the user pass
abort from the user input device to the Forth text interpreter?
Does the Standard implies that the return stack is emptied, and then its depth is restored, and it's content is not garbled? Or that QUIT should not empty the return stack in presence of an exception frame? And, should the system eventually print "-1 test-passed"?
On the 2017 standard meeting the Exception word set was made mandatory to make it possible to remove some ambiguous conditions.
Could somebody point out the corresponding proposal and/or rationale for that?
An alternative way could be to remove the ambiguous conditions in the Exception word set only (by updating the corresponding core sections), or conditionally specify behavior in the core sections, i.e. to throw an exception if the Exception word set is implemented, and declare an ambiguous condition otherwise.
If you want (or don't want) such changes, reply to this proposal.
I want such changes. In the current wording some important nuances are unclear (see also a recent discussion in ForthHub)
Correct link: Is QUIT expected to THROW?