Liste des Groupes | Revenir à cl forth |
On 16/05/2025 3:53 pm, Ruvim wrote:Could you please provide a practical use case for this? The standard `quit` is useful for debugging, at the least.On 2025-05-15 06:14, dxf wrote:The goal is catching fish. What happens to the ones you catch and then...>
>
CATCH has already done the damage. It would be naive for a programmer
to assume he can re-throw QUIT and it will be as if nothing ever happened.
My point is that such a word is completely useless.
decide to throw it back in is relatively minor. If they end up a bit
worse for wear that's just how it is.
If you make `throw` do this regardless of whether a user's exception frame exists in the exception stack, you make the `-56` error code uncatchable. So, the following test case will fail:Default behaviour of QUIT is Core QUIT. THROW handles -56 by jumping toPresumably an implementer of a catchable QUIT actually wants it caught.>
The question then is what can he do for the occasions when he wants it
impervious to CATCH and there are solutions for that.
>
What solution do you mean?
Core QUIT.
The application programmer then has the option of making QUITBut this option already exists. There is no need to specially handle `-56` in `throw`.
catchable by defining:
: QUIT -56 THROW ;
Les messages affichés proviennent d'usenet.