Islands for Squeak3.4 and beyond

Nathanael Schärli n.schaerli at gmx.net
Mon Feb 24 09:59:51 UTC 2003


Hi Daniel, hi all

> Like I mentioned in the context of the Traits work, this 
> should not be hard to work around. The temporary, ugly hack 
> is to add a class variable that will hold an 
> IdentityDictionary from instances of ClassDescription to the 
> values of the desired variables.

I have been aware of this solution, and it actually works pretty nicely.
Therefore, if I really had to release a traits changeset right now I
would probably do it this way.

However, this is not the only problem I was running into when I did the
traits work. In fact, there are several things in the kernel that are
not very clean and make modifications/extensions really hard and messy,
no matter how I tried.

That's why I finally decided not to rush in and spend a lot of time
creating a changeset that is kind of messy anyway. Instead, I plan to
clean up the kernel first and then implement traits in a clean way that
has a well-defined interface to the traditional ST kernel.

An other advantage of this plan is the fact that it gives me the
opportunity to implement an extension of traits (let's call it traits
v2), which has significant advantages over the current version and is
way more useful. And since v2 is completely downwards-compatible to v1,
this clean implementation will also serve as the reference
implementation of traits as they are now.

Nathanael


> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On 
> Behalf Of Daniel Vainsencher
> Sent: Sonntag, 23. Februar 2003 02:14
> To: squeak-dev at lists.squeakfoundation.org
> Subject: Re: Islands for Squeak3.4 and beyond
> 
> 
> [ClassBuilder bug blocking Islands]
> 
> Like I mentioned in the context of the Traits work, this 
> should not be hard to work around. The temporary, ugly hack 
> is to add a class variable that will hold an 
> IdentityDictionary from instances of ClassDescription to the 
> values of the desired variables. Create accessor methods in 
> the instance side that actually access the class variable, 
> and when we have CB fixed, move the variable from class-side 
> to instance-side.
> 
> Down sides are performance hit of going through a dictionary, 
> and needing to later remove said hack.
> 
> Example attached adds a virtual variable testData to ClassDescription.
> 
> Daniel
> PS I hope this technique doesn't happen to interact with the 
> Islands restrictions themselves, that would be a bummer...
> 
> Boris Gaertner <Boris.Gaertner at gmx.net> wrote:
> > >>LOADING changeset PrivilagedMethods.9.cs
> > This change set contains a modification of class 
> ClassDescription. An 
> > attempt is made to add an instance variable to that class. This 
> > requires recompilation of the entire system and in Squeak 
> 3.4 it ends 
> > with a fatal error. This is the same error that Nathanael Schärli 
> > <n.schaerli at gmx.net> reported when he announced Traits 
> (mail from Feb 
> > 02, 2003)
> > 
> > We really really have to fix that problem but at this 
> moment I do not 
> > have the time to do it. (It is not a simple thing to 
> understand what 
> > is currently wrong. Things are additionally complicated by the fact 
> > that recompilation of the entire system is time consuming, so the 
> > testing alone requires many hours)
> > 
> > Since Squeak 3.2 we had two change sets that substantially modified 
> > the ClassBuilder; these are change sets 4956 und 5092.
> > 
> > I tried to load Island into Squeak 3.0. Recompilation of class 
> > ClassDescription and all its subclasses was possible, but 
> later I ran 
> > in problems that I currently do not understand.
> > 
> > For this evening my resumee is that it is not that easy to bring 
> > Island to newer versions of Squeak. Sorry!
> >
> 



More information about the Squeak-dev mailing list