To Traits Or Not To Traits (Was: Re: Stefs roadmap for 3.9, time to get it nailed down)

stéphane ducasse ducasse at iam.unibe.ch
Thu Feb 24 16:16:50 UTC 2005


>> However, the good news is that even if traits are part of the basic
>> image, people do not have to use and deal with them if they do not 
>> want
>> to. So, there really should be no disadvantage/change for people who
>> just want to ignore them. But as I said in my last email, I agree that
>
> I would like to hear more about that. Let me take the role of a
> Traits-hater here:
>
> - Can I use the standard libraries and not know about Traits?

Yes

> Before you say "yes" :) think it through, for example, if I edit a 
> method in a
> class that comes from a Trait (I haven't read all your papers yet, but 
> I
> did try to print some of it) what happens?

You add a method in your class as usual. Method do not come from traits
if you do not use traits. Now if your class uses a trait then you still 
define
a method in your class as normal. Your method simply is the one used 
instead
of the one of the traits.

Why don't you read the papers?

> Am I editing the Trait? And
> then I am affecting other classes using it? So I am guessing (just
> guessing) that people *do* need to know about Traits (if we use them 
> for
> standard libraries) or else they will get confused. Correct?

But if you do not want to use traits you do not have to edit them?

Read them and try the squeakmap version.

> - If I don't use Traits and don't use any libraries using Traits (given
> that no standard libraries use them) and if I... use ordinary browsers
> etc. What is the effect on me?

Zero

>  Does Traits have any effect then at all?

Yes zero effect. You can always flatten a class. Why don't you read the 
paper
and try the squeakmap version?

> Just asking to get a feel for this.
>
> - Does the old tools work if we introduce Traits or do they all break?
> :)

They work. You just have to ignore the traits use for the class.
I can teach Smalltalk to first year student without talking about traits
as soon as they do not use traits browser. You can introduce traits
as saying that this is a group of methods. No more no less. A bit like
first class category.

> Yes, perfect. So can we then decide on that - first a beta (or alpha or
> whatever you like to put in our hands)

The beta is out since some months already. The version of squeakmap
may not contain certain fixes adrian introduced (like the integration 
with the
debugger: you edit in the debugger a method it goes in the right 
traits. May be this is
not on squeakmap)

> - then we take first look, and
> then probably solicit some feedback from stakeholders.

Yes please do it, but read the %$%$#$%#X papers and try.
We even did an example with complex number to show how we can reuse code

> As a first rough plan. Ok?

Yes

>
>> Cheers,
>> Nathanael
>
> Cheers, Göran
>




More information about the Squeak-dev mailing list