No Hungarian Notation in Smalltalk - was [KCP] Eventnotification call for feedback

Peter van Rooijen peter at vanrooijen.com
Tue Nov 4 16:26:42 UTC 2003


From: "Brent Pinkney" <brent.pinkney at aircom.co.za>
> On Tue, 4 Nov 2003 15:11:14 +0100, Peter van Rooijen
> > In the absence of syntax for namespaces in names, you have no choice
> > except
> > to make the disctinction in the full name itself. For this prefixes are
> > almost always better than suffixes.
> >
> I must differ.
[snip]
> You are arguing that we should change the name of MessageNotUnderstood to
> MessageNotUnderstoodException or ExceptionMessageNotUnderstood. Surely by
> extension we chould change Integer to ClassInteger ans String to
> ClassString ?

I am not arguing that at all.

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.

In the absence of namespace syntax, those others (like you and me) have no
choice, if they want to avoid name clashes, than to add something to the
core class name. In most cases, prefixing, rather than suffixing, is to be
preferred.

I have used abbreviation prefixes for a long time with great success, and
this has also been the convention adopted by most authors.

The authors of the system classes in IBM Smalltalk have in fact used
abbreviation prefixes for many of the system classes in that dialect, and
this has proved to work well.

Regards,

Peter van Rooijen
Amsterdam




More information about the Squeak-dev mailing list