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

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

Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: dxf <dxforth@gmail.com>
Newsgroups: comp.lang.forth
Subject: Re: May the numbers speak - supplement
Date: Sat, 14 Jun 2025 12:45:15 +1000
Organization: i2pn2 (i2pn.org)
Message-ID: <2f8ffef2faa60d42480e0671a6d146c7c89bf28a@i2pn2.org>
References: <20129e22c76a2b18b0a745e9499cbd9b@www.novabbs.com>
 <nnd$673c55b0$2ad8f129@7aad895b352201b7>
 <cc0a8c7a3216f3ed508bde73fc8bd422@www.novabbs.com>
 <feed5481a2c6f29340546fbefb23bb31@www.novabbs.com>
 <37a6f52a3ab1ec533fcf7ef30beb1022@www.novabbs.com>
 <nnd$673c55b0$2ad8f129@52950e570341256b>
 <7c15e1538a1604ad3c7a293ae6196da2530cd1a4@i2pn2.org>
 <87zfed2sbn.fsf@nightsong.com> <102fk3b$2ut8q$1@dont-email.me>
 <f0afd2a96800329381638d089d9e958287a596d0@i2pn2.org>
 <nnd$60801ebf$673609a7@27f3ceb479661625> <87bjqr359x.fsf@nightsong.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 14 Jun 2025 02:45:14 -0000 (UTC)
Injection-Info: i2pn2.org;
	logging-data="412149"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="XPw7UV90Iy7EOhY4YuUXhpdoEf5Vz7K+BsxA/Cx8bVc";
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
X-Spam-Checker-Version: SpamAssassin 4.0.0
In-Reply-To: <87bjqr359x.fsf@nightsong.com>

On 14/06/2025 3:44 am, Paul Rubin wrote:
> Hans Bezemer <the.beez.speaks@gmail.com> writes:
>> That's why I consider the use of global variables in library functions
>> worse than locals. You're polluting the namespace.
> 
> Obviously there are ways around that with wordlists, but it would be
> nice if doing that was more convenient.  You could have program sections
> with their own encapsulated variables.

Good point.  As wordlists are expensive and complicated I leave them
for situations equally demanding e.g. assembler.  For libs (though not
applications) I hide support words or data no longer needed with BEHEAD.
To avoid their names potentially clashing with something during compile,
I precede them with -? which disables redefinition warning for that
item only.