[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Re: [RFC] Smalltalk scripting syntax
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] Re: [RFC] Smalltalk scripting syntax |
Date: |
Thu, 15 Mar 2007 22:06:52 +0100 |
User-agent: |
Thunderbird 1.5.0.10 (Macintosh/20070221) |
Mike Anderson wrote:
> Paolo Bonzini wrote:
>> If so, there is a good reason, and it is that class variables
>> are misused 99% of the time. Class variables are *global* variables
>> visible to a hierarchy and, as such, they should be used as little as
>> possible. When implementing a singleton, for example, what you *really*
>> want is a uniqueInstance class-instance variable.
>
> Apparently the writers of our class library didn't understand this.
You mean GNU Smalltalk's class library? Might be. :-)
If the new syntax teaches us better practices, that can only do
well.
Regarding the singleton example, consider what happens if you have
a hierarchy of singletons and put the "uniqueInstance" class method
in the topmost class. With class variables, it doesn't work. With
class-instance variables, it does.
Paolo
- [Help-smalltalk] Re: [RFC] Smalltalk scripting syntax, (continued)
- [Help-smalltalk] Re: [RFC] Smalltalk scripting syntax, parasti, 2007/03/16
- [Help-smalltalk] Directions for GNU Smalltalk (was Re: [RFC] Smalltalk scripting syntax), Paolo Bonzini, 2007/03/16
- [Help-smalltalk] Re: Directions for GNU Smalltalk (was Re: [RFC] Smalltalk scripting syntax), parasti, 2007/03/17
- Re: [Help-smalltalk] Re: Directions for GNU Smalltalk (was Re: [RFC] Smalltalk scripting syntax), Paolo Bonzini, 2007/03/18
- Re: [Help-smalltalk] Re: Directions for GNU Smalltalk (was Re: [RFC] Smalltalk scripting syntax), parasti, 2007/03/18
- Re: [Help-smalltalk] Re: Directions for GNU Smalltalk (was Re: [RFC] Smalltalk scripting syntax), Paolo Bonzini, 2007/03/19
- Re: [Help-smalltalk] Re: Directions for GNU Smalltalk (was Re: [RFC] Smalltalk scripting syntax), parasti, 2007/03/19
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Mike Anderson, 2007/03/14
- [Help-smalltalk] Re: [RFC] Smalltalk scripting syntax, Paolo Bonzini, 2007/03/15
- Re: [Help-smalltalk] Re: [RFC] Smalltalk scripting syntax, Mike Anderson, 2007/03/15
- Re: [Help-smalltalk] Re: [RFC] Smalltalk scripting syntax,
Paolo Bonzini <=
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Mike Anderson, 2007/03/12
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Paolo Bonzini, 2007/03/13
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, David Given, 2007/03/13
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Paolo Bonzini, 2007/03/14
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, David Given, 2007/03/14
- Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Paolo Bonzini, 2007/03/14
Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Paul D. Fernhout, 2007/03/09
Re: [Help-smalltalk] [RFC] Smalltalk scripting syntax, Mike Anderson, 2007/03/10