With classes you know where all the code is... With Prototypes, it is really easy to modify an object -- just add an instance variable, or add a method. You end up with thousands of variants. Most of these variant objects do not have names.
Does every morph have a name?
I strongly agree with this. In my experience, classes have been a very useful organizing principle; I wouldn't want to throw them away yet (I definitely wouldn't throw a party :).
You really don't have to "throw away" anything. From a "class" consumer's point of view, there's no difference between a class and a proto with the clone method renamed "new". The only difference is more flexibility for the developer and you can limit that however you like in the development enviroment.
The earlier point that flexibility/freedom is dangerous is true. Smalltalk has already made this trade off though. The fact that you can change a system class at runtime in Smalltalk means it's quite easy to corrupt the entire system from within it. But this is also very powerfull.
I wonder what sorts of opposition the Smalltalk view of being able to change things at runtime and other dangerous features(no type checking, late binding...) ran into in it's early days?
Steve
You really don't have to "throw away" anything.
Indeed; I was only using those words in reference to Dan's plan-of-attack message (same for "throwing a party"). I know one doesn't need to throw away anything; I'm familiar with what has been done in prototype systems to get class-like behavior (e.g., Self), as well as class-based work to get prototypical behavior (e.g., Johnson, Hinkle).
From a "class" consumer's point of view, there's no difference between a class and a proto with the clone method renamed "new".
I disagree. I think the objects answered by each are very different. The behavior of an object answered by a prototype is much less likely to be changed by parties unassociated with the sender, for example. You can't ignore your roots. :)
The only difference is more flexibility for the developer and you can limit that however you like in the development enviroment. The earlier point that flexibility/freedom is dangerous...
I think that's an unfair oversimplification of the point. I don't think the concern was with whether flexibility and freedom are dangerous. I think it was with how a system may be usefully organized. Personally, I'm not concerned in this discussion with making life "safer" for developers. I'm interested in making the system easier to understand and navigate.
So I think what you go on to write...
Smalltalk has already made this trade off though. The fact that you can change a system class at runtime in Smalltalk means it's quite easy to corrupt the entire system from within it. But this is also very powerfull.
...is a cop-out (no offense intended). Somewhat like saying "Well, driving a car is dangerous, so I might as well ignore all the traffic laws; at least I'll get there faster", ignoring the fact that many traffic laws (not all :) make driving easier and correlate strongly with common sense. Hmm, perhaps that analogy isn't very good; oh well. ;)
-C
-- Craig Latta composer and computer scientist craig.latta@netjam.org www.netjam.org latta@interval.com Smalltalkers do: [:it | All with: Class, (And love: it)]
...is a cop-out (no offense intended). Somewhat like saying "Well, driving a car is dangerous, so I might as well ignore all the traffic laws; at least I'll get there faster", ignoring the fact that many traffic laws (not all :) make driving easier and correlate strongly with common sense. Hmm, perhaps that analogy isn't very good; oh well. ;)
I agree that both analogies are poor.
But speaking of common sense; People don't think in terms of classes. There's been some psychological research into how people catagorize things and the theory of prototypes was one of the results of this work.
Lakoff's _Women, Fire, and Dangerous Things_ (recommended by David Ungar) is an good book on the subject.
Steve
squeak-dev@lists.squeakfoundation.org