Re: QUIT and ABORT

Liste des GroupesRevenir à cl forth 
Sujet : Re: QUIT and ABORT
De : ruvim.pinka (at) *nospam* gmail.com (Ruvim)
Groupes : comp.lang.forth
Date : 16. May 2025, 06:53:22
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <1006jsi$3js21$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
User-Agent : Mozilla Thunderbird
On 2025-05-15 06:14, dxf wrote:
On 14/05/2025 5:21 pm, Ruvim wrote:
On 2025-05-14 05:52, dxf wrote:
On 14/05/2025 12:39 am, Ruvim wrote:
>
[...]
>
but if you're going to enforce a catchable ABORT and
ABORT" then why omit QUIT
>
One more argument. If `QUIT` is catchable like `ABORT` then it:
- either behaves the same as `ABORT` (empties or restores the data stack depth);
- or does not predict the data stack at all when it starts the Forth text interpreter (because the data stack depth will be set according to the earliest/deepest user exception frame).
>
Here's how it would work in my system were I to add it:
>
If 'QUIT' is catchable then the functionality that was CORE QUIT will exist
under another name (or be nameless if the implementer so chooses).  Then
>
- if QUIT is not caught it performs the *functionality* described
    in CORE QUIT.
>
So, in this case there is no difference with the standardized behavior.
>
>
>
- if QUIT is caught then the stack point is determined by CATCH.
>
In most use cases the exception is rethrown after `catch` and eventually you will get into the Forth text interpreter with some random values on the data stack if the exception code is -56, and no values otherwise. This is useless and inconsistent. Therefore, the standardized behavior of `QUIT` is better.
 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.

 
- if ABORT is not caught it clears the data stack and performs the
    *functionality* described in CORE QUIT.
>
So you end up in the Forth text interpreter with the empty data stack.
>
>
- if ABORT is caught then the stack point is determined by CATCH.
>
And if the exception is rethrown after `catch`, you end up in the Forth text interpreter with the empty data stack too.
 So?  An empty data stack is what CORE ABORT does.
Yes, I brought this up just to show below that the result is the same.

>
So, whether the exception was rethrown or there was no user exception frame at all, the result is the same.
 Presumably 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?
--
Ruvim

Date Sujet#  Auteur
27 Mar 25 * "The Best Programming Language for the End of the World"198Alexis
27 Mar 25 +* Re: "The Best Programming Language for the End of the World"5Martin Nicholas
28 Mar 25 i`* Re: "The Best Programming Language for the End of the World"4Alexis
28 Mar 25 i `* Re: "The Best Programming Language for the End of the World"3Martin Nicholas
30 Mar 25 i  +- Re: "The Best Programming Language for the End of the World"1Alexis
30 Mar 25 i  `- Re: "The Best Programming Language for the End of the World"1Bernd Linsel
28 Mar 25 +* Re: "The Best Programming Language for the End of the World"7anthk
29 Mar 25 i`* Re: "The Best Programming Language for the End of the World"6mhx
29 Mar 25 i +- Re: "The Best Programming Language for the End of the World"1dxf
30 Mar 25 i +* Re: "The Best Programming Language for the End of the World"3anthk
5 Apr 25 i i+- Re: "The Best Programming Language for the End of the World"1anthk
6 Apr 25 i i`- Re: "The Best Programming Language for the End of the World"1sjack
31 Mar 25 i `- Re: "The Best Programming Language for the End of the World"1John Ames
30 Mar 25 +* Re: "The Best Programming Language for the End of the World"86sjack
1 Apr 25 i`* Re: "The Best Programming Language for the End of the World"85dxf
29 Apr 25 i `* Re: Why dial-a-standard is not a thing in Forth84Hans Bezemer
30 Apr 25 i  +* Re: Why dial-a-standard is not a thing in Forth80dxf
30 Apr 25 i  i+* Re: Why dial-a-standard is not a thing in Forth77Hans Bezemer
1 May 25 i  ii`* Re: Why dial-a-standard is not a thing in Forth76dxf
1 May 25 i  ii +* Re: Why dial-a-standard is not a thing in Forth3John Doe
1 May 25 i  ii i+- Re: Why dial-a-standard is not a thing in Forth1Stephen Pelc
1 May 25 i  ii i`- Re: Why dial-a-standard is not a thing in Forth1Anton Ertl
1 May 25 i  ii `* Re: Why dial-a-standard is not a thing in Forth72Hans Bezemer
2 May 25 i  ii  +- Re: Why dial-a-standard is not a thing in Forth1dxf
3 May 25 i  ii  `* Re: Why dial-a-standard is not a thing in Forth70dxf
3 May 25 i  ii   +* QUIT and ABORT (was: Why dial-a-standard is not a thing in Forth)68Anton Ertl
3 May 25 i  ii   i+- Re: QUIT and ABORT1dxf
3 May 25 i  ii   i+* Re: QUIT and ABORT65dxf
3 May 25 i  ii   ii`* Re: QUIT and ABORT64Anton Ertl
4 May 25 i  ii   ii +* Re: QUIT and ABORT62dxf
4 May 25 i  ii   ii i`* Re: QUIT and ABORT61Anton Ertl
5 May 25 i  ii   ii i +- Re: QUIT and ABORT1dxf
5 May 25 i  ii   ii i +* Re: QUIT and ABORT54dxf
5 May 25 i  ii   ii i i`* Re: QUIT and ABORT53Ruvim
5 May 25 i  ii   ii i i +- Re: QUIT and ABORT1Ruvim
6 May 25 i  ii   ii i i +* Re: QUIT and ABORT3dxf
6 May 25 i  ii   ii i i i+- Re: QUIT and ABORT1Anton Ertl
6 May 25 i  ii   ii i i i`- Re: QUIT and ABORT1Ruvim
6 May 25 i  ii   ii i i `* Re: QUIT and ABORT48dxf
6 May 25 i  ii   ii i i  +* Re: QUIT and ABORT3Ruvim
6 May 25 i  ii   ii i i  i+- Re: QUIT and ABORT1Anton Ertl
6 May 25 i  ii   ii i i  i`- Re: QUIT and ABORT1dxf
6 May 25 i  ii   ii i i  `* Re: QUIT and ABORT44Anton Ertl
6 May 25 i  ii   ii i i   `* Re: QUIT and ABORT43dxf
7 May 25 i  ii   ii i i    `* Re: QUIT and ABORT42Ruvim
8 May 25 i  ii   ii i i     +* Re: QUIT and ABORT40dxf
8 May 25 i  ii   ii i i     i`* Re: QUIT and ABORT39Ruvim
9 May 25 i  ii   ii i i     i `* Re: QUIT and ABORT38dxf
9 May 25 i  ii   ii i i     i  `* Re: QUIT and ABORT37Ruvim
9 May 25 i  ii   ii i i     i   `* Re: QUIT and ABORT36dxf
9 May 25 i  ii   ii i i     i    +* Re: QUIT and ABORT2albert
10 May 25 i  ii   ii i i     i    i`- Re: QUIT and ABORT1dxf
9 May 25 i  ii   ii i i     i    `* Re: QUIT and ABORT33Ruvim
10 May 25 i  ii   ii i i     i     +- Re: QUIT and ABORT1dxf
13 May 25 i  ii   ii i i     i     `* Re: QUIT and ABORT31Ruvim
14 May 25 i  ii   ii i i     i      `* Re: QUIT and ABORT30dxf
14 May 25 i  ii   ii i i     i       `* Re: QUIT and ABORT29Ruvim
15 May 25 i  ii   ii i i     i        `* Re: QUIT and ABORT28dxf
16 May 25 i  ii   ii i i     i         `* Re: QUIT and ABORT27Ruvim
16 May 25 i  ii   ii i i     i          `* Re: QUIT and ABORT26dxf
16 May 25 i  ii   ii i i     i           `* Re: QUIT and ABORT25Ruvim
17 May 25 i  ii   ii i i     i            `* Re: QUIT and ABORT24dxf
17 May 25 i  ii   ii i i     i             `* Re: QUIT and ABORT23Ruvim
17 May 25 i  ii   ii i i     i              `* Re: QUIT and ABORT22dxf
17 May 25 i  ii   ii i i     i               `* Re: QUIT and ABORT21Ruvim
18 May 25 i  ii   ii i i     i                `* Re: QUIT and ABORT20dxf
18 May 25 i  ii   ii i i     i                 +* Re: QUIT and ABORT2Anton Ertl
18 May 25 i  ii   ii i i     i                 i`- Re: QUIT and ABORT1dxf
18 May 25 i  ii   ii i i     i                 `* Re: QUIT and ABORT17Ruvim
18 May 25 i  ii   ii i i     i                  `* Re: QUIT and ABORT16dxf
19 May 25 i  ii   ii i i     i                   `* Re: QUIT and ABORT15Ruvim
20 May 25 i  ii   ii i i     i                    `* Re: QUIT and ABORT14dxf
24 May 25 i  ii   ii i i     i                     `* Re: QUIT and ABORT13Ruvim
24 May 25 i  ii   ii i i     i                      +* Re: QUIT and ABORT7mhx
24 May 25 i  ii   ii i i     i                      i+* Re: QUIT and ABORT5Ruvim
24 May 25 i  ii   ii i i     i                      ii`* Re: QUIT and ABORT4mhx
24 May 25 i  ii   ii i i     i                      ii +- Re: QUIT and ABORT1Ruvim
24 May 25 i  ii   ii i i     i                      ii +- Re: QUIT and ABORT1Anton Ertl
24 May 25 i  ii   ii i i     i                      ii `- Re: QUIT and ABORT1albert
24 May 25 i  ii   ii i i     i                      i`- Re: QUIT and ABORT1Anton Ertl
24 May 25 i  ii   ii i i     i                      +- Re: QUIT and ABORT1albert
24 May 25 i  ii   ii i i     i                      `* Re: QUIT and ABORT4dxf
24 May 25 i  ii   ii i i     i                       `* Re: QUIT and ABORT3Ruvim
25 May 25 i  ii   ii i i     i                        `* Re: QUIT and ABORT2dxf
26 May 25 i  ii   ii i i     i                         `- Re: QUIT and ABORT1dxf
8 May 25 i  ii   ii i i     `- Re: QUIT and ABORT1Ruvim
5 May 25 i  ii   ii i `* Re: QUIT and ABORT5mhx
6 May 25 i  ii   ii i  +- Re: QUIT and ABORT1dxf
7 May 25 i  ii   ii i  `* Re: QUIT and ABORT3albert
7 May 25 i  ii   ii i   `* Re: QUIT and ABORT2minforth
7 May 25 i  ii   ii i    `- Re: QUIT and ABORT1dxf
4 May 25 i  ii   ii `- Re: QUIT and ABORT1dxf
4 May 25 i  ii   i`- Re: QUIT and ABORT (was: Why dial-a-standard is not a thing in Forth)1albert
5 May 25 i  ii   `- Re: Why dial-a-standard is not a thing in Forth1dxf
30 Apr 25 i  i`* Re: Why dial-a-standard is not a thing in Forth2sjack
1 May 25 i  i `- Re: Why dial-a-standard is not a thing in Forth1dxf
30 Apr 25 i  `* Re: Why dial-a-standard is not a thing in Forth3albert
30 Apr 25 i   `* Re: Why dial-a-standard is not a thing in Forth2Hans Bezemer
30 Apr 25 i    `- Re: Why dial-a-standard is not a thing in Forth1mhx
4 Apr 25 +- Re: "The Best Programming Language for the End of the World"1dxf
5 Apr 25 `* Re: "The Best Programming Language for the End of the World"98dxf

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal