Deutsch   English   Français   Italiano  
<ad7048513cca2117bb04396db85ef6196a257605@i2pn2.org>

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

Path: ...!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: dxf <dxforth@gmail.com>
Newsgroups: comp.lang.forth
Subject: Re: Back & Forth - Co-routines
Date: Fri, 7 Feb 2025 01:59:53 +1100
Organization: i2pn2 (i2pn.org)
Message-ID: <ad7048513cca2117bb04396db85ef6196a257605@i2pn2.org>
References: <nnd$2fb29a8e$298ef3f8@23fe4f00fa62d734>
 <vnq10p$162l3$1@dont-email.me> <nnd$28e37865$1ff3c947@ec3118cc4d5fd42b>
 <874j1aycdt.fsf@nightsong.com> <nnd$68d49e22$0e1b270a@ce4705a037955a82>
 <3c3bdb056696f15c43fa512b5366002d@www.novabbs.com>
 <2025Feb6.135712@mips.complang.tuwien.ac.at>
 <3955434636b2a293c6a9c6d726ff6eae@www.novabbs.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 6 Feb 2025 14:59:55 -0000 (UTC)
Injection-Info: i2pn2.org;
	logging-data="2967991"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc";
User-Agent: Mozilla Thunderbird
In-Reply-To: <3955434636b2a293c6a9c6d726ff6eae@www.novabbs.com>
X-Spam-Checker-Version: SpamAssassin 4.0.0
Content-Language: en-GB
Bytes: 2325
Lines: 33

On 7/02/2025 12:59 am, minforth wrote:
> On Thu, 6 Feb 2025 12:57:12 +0000, Anton Ertl wrote:
> 
>> minforth@gmx.net (minforth) writes:
>>> On Tue, 4 Feb 2025 12:26:26 +0000, albert@spenarnc.xs4all.nl wrote:
>>>> Remark that is doesn't introduce any unfamiliar syntax,
>>>> only does away with "Forth shall not nested definitions"
>>>> (Says who?)
>>>
>>> Given that a Forth system supports quotations and xt-locals,
>>> nested definitions are easy to implement.
>>
>> You mean:
>>
>> : foo [: ." xyz" ;] {: xt: bar :} bar ;
>>
>> Sure, you then get a local that behaves similar to a nested
>> definition, but I don't think anyone would want to do that.
> 
> Yes, that's the mechanism. Actually I use it with some syntactic
> sugar for better readability:
> 
> : foo
>    <: bar ." xyz" ;>
>  bar
> ;
> 
> I find this quite handy, since upvalues (locals within foo's
> context) are accessible from within bar.

AFAIR 200x nested definitions were justified on the grounds named
definitions were neither needed nor wanted and access to external
locals not necessary.  Somebody miscalculated?