No Hungarian Notation in Smalltalk

Brent Pinkney brent.pinkney at aircom.co.za
Tue Nov 4 16:48:22 UTC 2003


On Tue, 4 Nov 2003 17:26:42 +0100, Peter van Rooijen 
<peter at vanrooijen.com> wrote:

>
> IMO it is totally appropriate, and quite satisfactory, for system classes
> (which include, but don't have to be limited to, base image classes) to 
> live
> in the default namespace. Thus they don't need any prefix nor suffix.
>
> It is the classes produced by others than the organizational entity that
> creates the system classes, and manages the default namespace, that need
> disambiguation.
>

Precies :)

It is precicely because Roel's System Change events are _probably_ going 
to be included in the base image, that we thrash out and firmly establish 
the naming convention we would like to see observed in Squeak.

As I have explained and illustrated, and you and others previously 
concurred, the tradition is to avoid prefixes or suffixes.

However, disambiguation of more optional classes is a separate unrelated 
issue and for that reason there already exists the Prefix Registry page on 
the Swiki reserve such prefixes.

As illustrated, one of the de-facto standards is to avoid the Hungrian 
convention of including implementation type in the name. So even if I have 
a new Event subclass to capture the ocurrence of a flower blossoming in 
package BloemStuff, its name would be BloemFlowerBlossom and not 
BloemFlowerBlossomEvent or BloemEventFlowerBlossom.

By your own reasoning, were flower blossoming events to be introduced as a 
core class, only the namespace prefix would dissapear, leaving 
FlowerBlossom.

The Bloem prefix is cleary only for disambiguation and could be nicely 
removed if better namespace support was ever introduced:

		BloemFlowerBlossom new
becomes
		Bloem FlowerBlossom new


q.e.d :)


Brent





More information about the Squeak-dev mailing list