Smalltalk Design Question

Mark Wai mwai at ibm.net
Tue Jan 27 21:19:56 UTC 1998


Hi,

I have a question that I think the "original" Smalltalk designers could help
me understand:

I always wondering why Smalltalk method signature (not keywords like self,
super etc.,) are CaSe SENSITIVE.  Was this by design or due to
implementation constraints?  I can understand why static languages are case
sensitive(e.g. more efficient compiling) but for dynamic languages like
Smalltallk, I can think of more advantages of being non-case sensitive
rather than case sensitive.  Some obvious advantages of having Smalltalk
non-case sensitive that I can think of are:

-  reduce typo runtime errors
-  polymorphism is easier due to lesser constraint (especially when the
method signature is long)
-  reduce ambigous methods that have same name but different cases
etc,

Of course, the Smalltalk compiler must not allow the same method define if
the names are the same but the case is different.  Implementation wise, I
think it should not be that hard (I have prototyped that in IBM Smalltalk a
while ago, e.g. changing >>doesNotUnderstand: for quick hack).  Therefore, I
think I must have missed something.  I sure hate seeing different Smalltalk
dialects implements the same method with the same name but different case.
I think one of those classic example is >>asUppercase versus >>asUpperCase.
This creates portablitiy problem between multi-vendor dialects.  Maybe this
should consider to be part of ANSI standard too.  

I appreciate any comments.

Thanks.

--
Mark Wai
Frontier Systems Architecture Inc.	
mailto: mwai at ibm.net or:[ mwai at frontiersa.com]       
__





More information about the Squeak-dev mailing list