Deutsch   English   Français   Italiano  
<vvi2jh$1n1h4$1@dont-email.me>

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

Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Ron AARON <clf@8th-dev.com>
Newsgroups: comp.lang.forth
Subject: Re: In C world they invented FORGET and DP lately
Date: Thu, 8 May 2025 13:55:46 +0300
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <vvi2jh$1n1h4$1@dont-email.me>
References: <88e936073209b23edccec371b2045992@www.novabbs.com>
 <3b2eb888ad3b76ba4dd8c2cec984d45d0b7befbb@i2pn2.org>
 <c7e7e6178c9f64a27dc365abbd1f38e7@www.novabbs.com>
 <fef9b3640fcf27436acfbebbd0b2c235310a2e5b@i2pn2.org>
 <nnd$3f3c0437$711db4e3@cd8cc85eb802039d>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 08 May 2025 12:55:47 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="88a9d28873538a63ba10daafe7cb8bad";
	logging-data="1803812"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+ll60endjMmob/opJLRw6g"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:cwgaLce1CWuePkPfJf3yD1vJ8hk=
Content-Language: en-US, he
In-Reply-To: <nnd$3f3c0437$711db4e3@cd8cc85eb802039d>
Bytes: 3179

On 08/05/2025 13:43, Hans Bezemer wrote:
> On 08-05-2025 11:30, dxf wrote:
>> On 8/05/2025 6:39 pm, LIT wrote:
>>>> Aimless fiddlers should just switch to Forth.
>>>
>>> In next 20 years they'll figure out how to FORGET
>>> a function.
>>
>> I can't remember the last time I forgot something.
> Actually - I use it daily. Note that 4tH has no word sets and no 
> namespaces. Coming from C - I never felt I needed them. What I *did* 
> have was "static" - which allowed me to hide those functions which 
> weren't important for the API of that module.
> 
> So I added HIDE to 4tH, to clean up modules for that very purpose. 
> Usually, all non-public words are named like (NAME) - according to the 
> rules set in "Thinking Forth". Which already helps to avoid any 
> collisions, since even *if* they were previously used, they would be 
> hidden by now.
> 
> So its' not uncommon to see some - or even rather large - lists of HIDEs 
> at the end of a module. Note I don't have to do them by hand, this one 
> does it for me: https://sourceforge.net/p/forth-4th/code/HEAD/tree/ 
> trunk/4th.src/makehide.4th
> 
> Other Forths had HIDE, so I borrowed it. There is no UNHIDE or 
> equivalent because 4tH can't. The thing is thrown out of the symbol 
> table completely on HIDE.
> 
> Also, the size of the symbol table is determined by (amongst others) 
> HIDE. Defining words expand the size of the symbol table, HIDE reduces 
> it. That's why you can't make HIDE act conditionally by [IF] and [THEN] 
> - since at that stage, the system is unable to evaluate such expressions.

In fact, that's where I use 'forget' in 8th. When I "need" a library 
file, it can have "private" words which go in a special namespace. At 
the end of processing the library, I forget that namespace and so the 
words are truly invisible outside of the library scope.