Re2: Example A-SIGNATURES Re: A Way to express Standard multi-argument
Method Signatures in Smalltalk Re: [ANSI-Smalltalk] Next STEPs
Panu Logic
panulogic at gmail.com
Wed Mar 12 08:35:28 GMT 2008
Paolo Bonzini wrote:
> ....
>> 2. A result type written as 'self'
> That should be #self for obvious reasons. Misunderstanding the
> scoping of variables (special variables like self included) is one of
> the most common mistakes in design Smalltalk DSLs.
On second thought, I think you're right. Using #self allows us to
evaluate these signature descriptions in a workspace, or in a headless
environment.
But his means that #self in a class-side signature must refer to the
meta-class, not the class, because we can no longer write ' self
class'; nor does it make sense to write '#self class'. But that is
not too bad, considering the advantages of being "context free".
-Panu Viljamaa
More information about the ANSI-Smalltalk
mailing list