Pressures for Substantially New Squeaks

Andrew C. Greenberg werdna at gate.net
Sat Feb 13 16:34:17 UTC 1999


Reinier provides a clear (albeit unsurprising) existence proof that 
the semantics for sound modular programming are already present in 
Squeak.  As I noted in an earlier posting, a reading of the 
VisualBasics white paper on namespaces suggests that it would not be 
an overwhelmingly difficult problem to provide strong namespace 
support.  Concerning his solution . . .

> Hi,
>
> I've been following the name space discussion for a while and I do not
> really understand the need for something like that. I.e. I solve the
> "problem" as follows:

.. . .

> Now, if we can discipline our selves to always specify which dictionary to
> use the problem can be solved at Object level.
> Example (an actual problem for me when working on ThingLab)
>
>     thingLabSliderClass := self classAt: 'Slider' in: 'ThingLab'.
>     morphicSliderClass := self classAt: 'Slider' in: 'Morphic'.

Rein imposes quite a bit of discipline on himself and others.  I, for 
one, find merit in the syntactic sugar of being able to create 
strings simply by reference to the class "String," rather than having 
to use, the onerous:

	stringClass _ self classAt: #String in: #Smalltalk
	foo _ stringClass new: 20

he would observe, correctly, that it would be unnecessary since that 
is the default dictionary.  My point, precisely!  Users preferring 
the cleaner syntax

	foo _ String new: 20

for things other than basic types will be encourages simply to forego 
the "benefits" of the discipline.

Ergo the development over the years of "module" definitions, with 
import facilities including generic imports that do all the work of 
importing for you.  (Clearly, that work can be builtin to Reinier's 
basic system with a bit of reflexive tinkering, but again, that's my 
point.)

The essential functionality of being able to have the most commonly 
used symbols (typically the most local and sytem-based global 
symbols) referred to by their name alone, with the option of giving 
fully qualified names for others is attractive to people building 
modules.  It's also far easier for folks to use, and hence far more 
likely to be used.

Agreed that the language needn't be changed to accomplish the task, 
but it ought to take less than (what will appear to most as) 
fundamental system hacking to accomplish.





More information about the Squeak-dev mailing list