Classes in eToys

Blake blake at kingdomrpg.com
Wed Dec 22 10:47:58 UTC 2004


On Wed, 22 Dec 2004 11:15:16 +0100, <hjh-sqlist at lexdb.net> wrote:

>> Is there any way to go from the prototype you build as an eToy to a
>> genuine class?
>>
> The answer is 'No'.

That's what I figured.

> Not easy at least. Or perhaps it doesn't make much sense. Because that  
> is not the general idea behind EToys. It was a deliberate reduction of  
> concepts to find out what is still possible.

Sure. And has been pointed out, there isn't a good transition between  
eToys and Squeak proper.

> Etoys is instance based. Every instance gets it's own singleton class - a
> subclass of Player is generated which contains the code of the scripts  
> which you develop with the tiles.
> (It is not meant that people should work with that directly but of  
> course you can experiment with that. The classes/methods are named like
> Player56>>script1).

Yeah, see, I suspect this is going to get me into trouble in short order.  
My kid is going to want to create a horde of alien/monster/whatevers. He  
loved the stamp tool and the copy halo button, but they're going to lose  
their charm if he has to program them each separately.

> P.S. However the question is of course very interesting. The idea is to  
> work with an object (add methods etc.) and then generalize. This is  
> basically what some Smalltalkprogrammers are doing all the time.

Prototype-based programming.

I'll check out the thesis. In the meantime, what would be ideal, I wonder.  
A copy method? Creating a real class from the eToy? Smalltalk's  
extensibility has to be its most impressive feature; I'm sure it could be  
done. (I'm still working on understanding traits....)



More information about the Squeak-dev mailing list