[squeak-dev] Namespaces, Packages: Image available for download, screencast.

Igor Stasenko siguctua at gmail.com
Wed Jul 16 00:24:17 UTC 2008


Cool screencast Michael! :)

I have played with it few minutes to look how it doing things.

One thing, which i don't like is how looks a class declaration:

self inNamespace: 'Kernel.Classes'
	createClass: 'ClassCommentReader'
	ofType: 'normal'
	superclass: 'ClassCategoryReader'
	instanceVariableNames: ''
	classVariableNames: ''

to what 'self' refers to?

Do you plan to allow creating classes by subclassing existing ones,
e.g. by sending a messages to them, like in regular smalltalk?

To my understanding, the above should look like:

Kernel.Classes addClass: (
   Kernel.Classes.ClassCategoryReader subclass: #ClassCommentReader
   type: 'normal'
   instanceVariableNames: ''
   classVariableNames: ''
).

This indicates two separate concepts involved here: namespaces
(Kernel.Classes) and subclassing by sending message to existing class.
And #addClass: here is just a convenience method, which can look like:

Namespace>> addClass: aClassObject
   ^ self addSymbol: aClassObject name value: aClassObject
"or, more smalltalk-ish"
  ^ self at: aClassObject name put: aClassObject



More information about the Squeak-dev mailing list