Migrating Traits to Visual Age

Diego Tubello diegotubello at hotmail.com
Tue Sep 26 00:45:28 UTC 2006


Thanks for your help!
We'll keep you informed about our progress.

Cheers,
Diego

-----Mensaje original-----
De: squeak-dev-bounces at lists.squeakfoundation.org
[mailto:squeak-dev-bounces at lists.squeakfoundation.org] En nombre de Adrian
Lienhard
Enviado el: lunes, 25 de septiembre de 2006 16:15
Para: The general-purpose Squeak developers list
Asunto: Re: Migrating Traits to Visual Age

Hi Hernan,

On Sep 25, 2006, at 13:40 , Hernan Wilkinson wrote:

> Hi Adrian,
>    what do you mean by "automated bootstrapping"?... I understand  
> what it means by itself but not in the context of traits... Could  
> you give us an example?

Since traits change the behavior of the kernel, loading traits can be  
problematic (unless you have an atomic load, which we don't have in  
Squeak). One source of problems is that when loading traits, the code  
that is run for loading is being modified. Hence, if the methods are  
not loaded in the right order, the system gets broken very quickly.
Another need to do some bootstrapping was because the traits  
implementation uses traits (to allow for sharing behavior between the  
classes and the traits class hierarchy)...

>    I haven't look at the Traits implementation but I know it has  
> tests... what do they test? do they test the hole implementation?  
> only the traits composition?

They are supposed to test the whole implementation. Many tests are  
about verifying that the method dictionaries get updated correctly.  
Those tests work at a high level, hence, they can probably be reused  
without much change.

Cheers,
Adrian


>
>    Thanks,
>    Hernan.
>
> Adrian Lienhard wrote:
>> Hi,
>>
>> I don't think that it makes sens to try copying the implementation  
>> from Squeak. It is too much depending on the details of the  
>> implementation of the classes kernel. What is independent from  
>> that is the small part which models trait compositions, and of  
>> course the tests, which will certainly be helpful.
>>
>> The kernel part is quite straight forward to implement: the main  
>> thing is to keep track of changed or deleted methods and to  
>> appropriately update the method dictionaries of affected classes  
>> and traits. In our implementation, traits are behaviors like  
>> classes, with the main difference beeing that they cannot be  
>> instantiated. To get an idea of how this works, have a look at the  
>> Squeak implementation. You can also find information here [1].
>>
>> Of course, the real work then comes when you want to integrate  
>> traits seamlessly into the environment (code browsers, SCM,  
>> changesets, etc.), and to have an automated bootstrapping.
>>
>> Please feel free to ask questions... For papers about traits see [2].
>>
>>  Cheers,
>> Adrian
>>
>> [1] http://www.adrian-lienhard.ch/files/master.pdf
>> [2] http://www.iam.unibe.ch/~scg/Research/Traits/index.html
>>
>> ___________________
>> Adrian Lienhard
>> www.adrian-lienhard.ch
>>
>>
>> On Sep 23, 2006, at 21:18 , Diego Tubello wrote:
>>
>>> Hi,
>>>
>>>
>>>
>>> We are trying to migrate Traits into Visual Age, and thought  
>>> about three alternatives:
>>>
>>> -          Try to copy squeak implementation into Visualk Age as  
>>> it is and make the tests pass.
>>>
>>> -          Copy only the tests and make an implementation of  
>>> Traits to make tests pass.
>>>
>>> -          Implement Traits from the ground in Visual Age.
>>>
>>>
>>>
>>> Any idea of which is the best way to do this?, or if there is a  
>>> better approach?
>>>
>>>
>>>
>>> Thanks,
>>>
>>> DiegoTubello
>>>
>>> Luciana Garcia Richter
>>>
>>>
>>
>>
>>
>>
>
>
> -- 
> ______________________________
> Lic. Hernán A. Wilkinson
> Gerente de Desarrollo y Tecnología
> Mercap S.R.L.
> Tacuari 202 - 7mo Piso - Tel: 54-11-4878-1118
> Buenos Aires - Argentina
> http://www.mercapsoftware.com
> ---------------------------------------------------------------------  
> Este mensaje es confidencial. Puede contener informacion amparada  
> por el secreto profesional. Si usted ha recibido este e-mail por  
> error, por favor comuniquenoslo inmediatamente via e-mail y tenga  
> la amabilidad de eliminarlo de su sistema; no debera copiar el  
> mensaje ni divulgar su contenido a ninguna persona. Muchas gracias.  
> This message is confidential. It may also contain information that  
> is privileged or otherwise legally exempt from disclosure. If you  
> have received it by mistake please let us know by e-mail  
> immediately and delete it from your system; you should also not  
> copy the message nor disclose its contents to anyone. Thanks.  
> ---------------------------------------------------------------------
>






More information about the Squeak-dev mailing list