Traits explicitRequirement -- and TClassDescription

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Traits explicitRequirement -- and TClassDescription

Ben Coman
I'm not familiar with the #explicitRequirement I see sent in Slice 17798.
Could someone explain why that is better than calling...
     self setName: aSymbol.


Also, another thing I've been curious about for a while, what is the
advantage of having TClassDescription when it only has one user
ClassDescription?


cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Traits explicitRequirement -- and TClassDescription

Max Leske

> On 26 Sep 2016, at 15:16, Ben Coman <[hidden email]> wrote:
>
> I'm not familiar with the #explicitRequirement I see sent in Slice 17798.
> Could someone explain why that is better than calling...
>     self setName: aSymbol.
>

Traits don’t have instance variables, so you somehow need to tell users to implement the methods that are supposed to write / read instance variables. Also, as traits are not classes, #subclassResponsibility isn’t entirely correct semantically.

>
> Also, another thing I've been curious about for a while, what is the
> advantage of having TClassDescription when it only has one user
> ClassDescription?
>
>
> cheers -ben
>


Reply | Threaded
Open this post in threaded view
|

Re: Traits explicitRequirement -- and TClassDescription

stepharo
In reply to this post by Ben Coman
I would like to remove traits users from metaclass class description.

I do not think that they are worht hteh complexity they bring.

Stef


Le 26/9/16 à 16:16, Ben Coman a écrit :

> I'm not familiar with the #explicitRequirement I see sent in Slice 17798.
> Could someone explain why that is better than calling...
>       self setName: aSymbol.
>
>
> Also, another thing I've been curious about for a while, what is the
> advantage of having TClassDescription when it only has one user
> ClassDescription?
>
>
> cheers -ben
>
>