Hey, a namsepaces discussoin! (Was: Re: Partitioning the image (was Re: Shrinking sucks!))

Ned Konz ned at squeakland.org
Sun Feb 20 20:26:17 UTC 2005


On Sunday 20 February 2005 10:39 am, Bert Freudenberg wrote:
> Am 19.02.2005 um 19:55 schrieb Ned Konz:
> > On Saturday 19 February 2005 2:27 am, Reinout Heeck wrote:
> >> In forth namespaces are just SystemDictionaries. There is a stack of
> >> namespace references called SEARCH-ORDER that the module under load
> >> is free
> >> to manipulate at load time (provided is has references to the
> >> namespaces it
> >> wants to stick in the search order). Name lookup works very simply by
> >> walking all the namespaces on the search-order until it finds a hit.
> >> No
> >> ambiguities to resolve (just like in St method lookup).
> >
> > This is the same as the lookup scheme in Perl.
>
> Doesn't this only fit with file-based languages?

Why would that be?

Usually, Forth is not considered a "file-based" language; most of the 
deployments of Forth (in terms of units) are in small embedded systems. Often 
the base system is cross-compiled; the dictionary in ROM is then chained to 
extensible ones in RAM. New words can be compiled on the fly (perhaps from 
code loaded over a serial port; Forth has often got an interactive prompt) 
and will be stuck into whatever dictionary is current at the time.

-- 
Ned Konz
http://bike-nomad.com/squeak/



More information about the Squeak-dev mailing list