Digest #195 2022-08-19


[259] 2022-08-18 12:09:37 ruv wrote:

requestClarification - Should QUIT propagate exceptions?

After a recent ForthHub discussion Is QUIT expected to THROW? the following question arises.

In the presence of the following facts:

  1. QUIT is not updated in the Exception word set
  2. QUIT empties the return stack, but doesn't empty the exception stack.
  3. THROW restores 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"?

[260] 2022-08-18 13:50:15 ruv wrote:

comment - Exception word set is not optional any more

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.


[r849] 2022-08-18 10:03:11 ruv replies:

proposal - Specify that 0 THROW pops the 0

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)

[r850] 2022-08-18 12:14:09 ruv replies:

requestClarification - Should QUIT propagate exceptions?

Correct link: Is QUIT expected to THROW?