Sujet : Re: May the numbers speak - supplement
De : dxforth (at) *nospam* gmail.com (dxf)
Groupes : comp.lang.forthDate : 14. Jun 2025, 03:45:15
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <2f8ffef2faa60d42480e0671a6d146c7c89bf28a@i2pn2.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Mozilla Thunderbird
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.