Re: THROW codes and ambiguous conditions

Liste des GroupesRevenir à cl forth 
Sujet : Re: THROW codes and ambiguous conditions
De : the.beez.speaks (at) *nospam* gmail.com (Hans Bezemer)
Groupes : comp.lang.forth
Date : 01. Jun 2025, 18:44:57
Autres entêtes
Organisation : KPN B.V.
Message-ID : <nnd$5d07338c$61b87fbd@d4d89ef8da41e19e>
References : 1
User-Agent : Mozilla Thunderbird
On 31-05-2025 03:10, dxf wrote:
AFAICS the statement in Section 9.3.5
   "A system choosing to execute THROW when detecting one of the ambiguous
   conditions listed in table 9.2 shall use the throw code listed there."
 effectively rules out the traditional use of ABORT" to convey the ambiguous
conditions listed in the table.  Is that how others read it?
 Early on DX-Forth it became apparent that maintaining a list of error
messages accessible by means of a THROW code was going to be messy and
worse - costly.  I wanted CATCH THROW but could do without the vision
ANS appeared to have in mind for it.  The consequence of retaining
ABORT" for classic ambiguous conditions means I can't individually
identify them at CATCH but I've yet to find this a problem.
 I'm curious whether others found ANS' requirement above 'a step too far'?
 
Frankly - I find the standard severely lacking in this regard. They do provide a long table with "errors", but fail to properly define them. All we get is a description, open to interpretation. IMHO - this is not how to set up a standard.
If the condition is described in more detail elsewhere, a basic reference should be listed. Even better - a mnemonic should be attached, not a "hard" code. I mean, even in their freshman years CS students are taught to use enums and constants instead of literals.
But okay - as usual, we do what we can. But I'm *not* gonna include a huge list of non-contiguous messages. Forget it. I got thirty - and that's frankly enough.
3, 4, 5, 6, 9, 10, 12, 13, 19, 22 and 24 are "standard" as far as I'm concerned - and the rest is either missing ("dictionary overflow"? 4tH has no dictionary!) or located elsewhere.
4tH *DOES* provide a list of mnemonics - and I advise to use those in programs rather than ANS THROW codes - if you want to write portable code, that is.
Note that in 4tH there is a compiler on one hand and on the other hand an interpreter - and never the twin shall meet. This also means that most of the codes/messages are specific to the one or the other.
In short, 4tH handles this issue conform its ANS-Forth statement:
"1. 4tH uses a different architecture which makes it impossible to be ANS-Forth compliant, so some constructions are simply not feasible;
2. Some constructions in ANS-Forth are considered to be illogical, inelegant, bloated, not intuitive, error prone, inefficient or otherwise not acceptable."
Hans Bezemer

Date Sujet#  Auteur
31 May 25 * THROW codes and ambiguous conditions37dxf
31 May 25 +* Re: THROW codes and ambiguous conditions7Anton Ertl
31 May 25 i+* Re: THROW codes and ambiguous conditions2dxf
3 Jun21:48 ii`- Re: THROW codes and ambiguous conditions1sjack
31 May 25 i`* Re: THROW codes and ambiguous conditions4Anton Ertl
1 Jun 25 i `* Re: THROW codes and ambiguous conditions3albert
1 Jun 25 i  `* Re: THROW codes and ambiguous conditions2Anton Ertl
1 Jun 25 i   `- Re: THROW codes and ambiguous conditions1albert
1 Jun 25 `* Re: THROW codes and ambiguous conditions29Hans Bezemer
2 Jun 25  +- Re: THROW codes and ambiguous conditions1dxf
2 Jun11:44  `* Re: THROW codes and ambiguous conditions27albert
3 Jun04:23   `* Re: THROW codes and ambiguous conditions26dxf
3 Jun07:10    +* Re: THROW codes and ambiguous conditions22Anton Ertl
4 Jun15:44    i`* Re: THROW codes and ambiguous conditions21dxf
4 Jun20:25    i `* Re: THROW codes and ambiguous conditions20sean
5 Jun07:09    i  +- Re: THROW codes and ambiguous conditions1dxf
5 Jun11:17    i  `* Re: THROW codes and ambiguous conditions18albert
6 Jun01:47    i   +- Re: THROW codes and ambiguous conditions1dxf
6 Jun07:15    i   `* Re: THROW codes and ambiguous conditions16sean
6 Jun12:00    i    `* Re: THROW codes and ambiguous conditions15albert
6 Jun22:06    i     `* Re: THROW codes and ambiguous conditions14sean
7 Jun04:10    i      `* Re: THROW codes and ambiguous conditions13dxf
7 Jun05:26    i       `* Re: THROW codes and ambiguous conditions12sean
7 Jun05:42    i        +- Re: THROW codes and ambiguous conditions1dxf
7 Jun10:43    i        +* Re: THROW codes and ambiguous conditions9Anton Ertl
7 Jun15:06    i        i`* Re: THROW codes and ambiguous conditions8dxf
7 Jun20:58    i        i `* Re: THROW codes and ambiguous conditions7Paul Rubin
8 Jun02:49    i        i  +* Re: THROW codes and ambiguous conditions3Paul Rubin
8 Jun04:36    i        i  i+- Re: THROW codes and ambiguous conditions1dxf
8 Jun09:07    i        i  i`- Re: THROW codes and ambiguous conditions1Anton Ertl
8 Jun03:16    i        i  +- Re: THROW codes and ambiguous conditions1dxf
8 Jun08:56    i        i  `* Re: THROW codes and ambiguous conditions2Anton Ertl
8 Jun15:45    i        i   `- Re: THROW codes and ambiguous conditions1dxf
7 Jun15:41    i        `- Re: THROW codes and ambiguous conditions1LIT
3 Jun09:43    +- Re: THROW codes and ambiguous conditions1John
4 Jun03:03    `* Re: THROW codes and ambiguous conditions2dxf
6 Jun11:47     `- Re: THROW codes and ambiguous conditions1Hans Bezemer

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal