globals considered harmfull.

I.R.Woollard at I.R.Woollard at
Tue Mar 22 16:31:10 UTC 1994

Self Style Suggestion:

If I want to produce an instance of something, I believe it is better
to ask the traits object for it.

I propose that most traits objects should respond to a 'new' invocation

- it allows the posibility of parameters to determine the contents.
- it doesn't preclude having globals as well
- a 'new' mixin is easily defined
- a lot of traits already have a prototype slot
- its less code in the clients, you don't have to use explicit "copy"'s
- it is closer to the smalltalk model, hence easier to learn

- accidently forgetting the copy is a real screw up, you end up
modifying the prototype


p.s. I'm obviously missing something here... I'm quite prepared to be

p.p.s. Is there any kind of style guide anywhere? (I have read the User

p.p.p.s. Long term, languages are port or die. How portable *is* Self?

More information about the Self-interest mailing list