Deutsch   English   Français   Italiano  
<nnd$2d9c6afc$0030a925@cd2cabd68cc02a71>

View for Bookmarking (what is this?)
Look up another Usenet article

Date: Sun, 16 Mar 2025 16:30:33 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: nest-sys revisited
Newsgroups: comp.lang.forth
References: <nnd$451a798f$08238180@7ebfa2c34bfc24b8>
 <8d760e814c0d0342eb9beaa0d271a6f1d1271e3a@i2pn2.org>
Content-Language: en-US
From: Hans Bezemer <the.beez.speaks@gmail.com>
In-Reply-To: <8d760e814c0d0342eb9beaa0d271a6f1d1271e3a@i2pn2.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <nnd$2d9c6afc$0030a925@cd2cabd68cc02a71>
Organization: KPN B.V.
Path: ...!news.nobody.at!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feed.abavia.com!abe006.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 37
Injection-Date: Sun, 16 Mar 2025 16:30:33 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
Bytes: 2578

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