Re: nest-sys revisited

Liste des GroupesRevenir à cl forth 
Sujet : Re: nest-sys revisited
De : the.beez.speaks (at) *nospam* gmail.com (Hans Bezemer)
Groupes : comp.lang.forth
Date : 16. Mar 2025, 16:30:33
Autres entêtes
Organisation : KPN B.V.
Message-ID : <nnd$2d9c6afc$0030a925@cd2cabd68cc02a71>
References : 1 2
User-Agent : Mozilla Thunderbird
On 14-03-2025 02:26, dxf wrote:
On 14/03/2025 3:19 am, albert@spenarnc.xs4all.nl wrote:
Apologize, for bad mouthing nested-sys in the coroutine discussion.
(not that I like this concept).
>
In the ISO 94 document the concept of nest-sys is indeed needed.
...
 Unavoidable really.  Nesting aka subroutine call - the process of
calling a function and when it completes, returning to the caller -
is a basic computing concept.  In forth 'nest-sys' represents the
information necessary to facilitate that return.  It should not be
confused with invoking a function i.e. 'xt' EXECUTE.
I agree with most of what you say - except EXECUTE, a "function" can be called, but has to return *somewhere* - otherwise it is a BRANCH (jump).
But that aside. I now know where I went wrong - and I'm sorry for the confusion. I keep forgetting Forth is a SYSTEM standard - and not a LANGUAGE standard.
In (classic) Forth, almost every single word is a subroutine call. When subroutine threaded, you see a long list of CALLs being compiled. Not so in 4tH. In 4tH MOST words are primitives that are not called, but simply the next in line to be executed. Hence, most words in 4tH don't deal with the Return stack - except those who are CALLed, EXECUTEd or EXITed.
Now, I guess this is also largely true for native code Forth compilers, but direct or indirect threaded Forths - I guess that the placing of nest-sys on the Return stack is mostly in the hands of the inner interpreter. So yes, Albert - I understand what you're saying now.
So - I'm sorry for the confusion I caused.
Hans Bezemer

Date Sujet#  Auteur
14 Mar 25 * Re: nest-sys revisited8dxf
14 Mar 25 +- Re: nest-sys revisited1dxf
16 Mar 25 `* Re: nest-sys revisited6Hans Bezemer
17 Mar 25  `* Re: nest-sys revisited5dxf
17 Mar 25   +* EXECUTE implementation in native-code systems (was: nest-sys revisited)3Anton Ertl
17 Mar 25   i`* Re: EXECUTE implementation in native-code systems2dxf
17 Mar 25   i `- Re: EXECUTE implementation in native-code systems1Anton Ertl
18 Mar 25   `- Re: nest-sys revisited1dxf

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal