On Jul 8, 2009, at 11:31 AM, Adrian Lienhard wrote:

> We had a discussion about this on this mailing list some time ago. The
> conclusion, as far as I remember, was that yes, ideally it should
> detect that the method exists in a superclass and hence should not add
> the atEnd method to the subclass in your example. This is not that
> easy to implement, though (if you think through the different cases of
> structural changes that would need to be captured to correctly update
> classes using traits). The simplest solution is to not implement atEnd
> in the trait. Anyway, the information that this method is a
> requirement should be automatically provided by a tool rather than
> being hardcoded by the developer.

yes after our discussion it was clear that requirement was too static  
for a language like
smalltalk.

>
> Cheers,
> Adrian
>
> On Jul 8, 2009, at 11:08 , Cyrille Delaunay wrote:
>
>> Hi,
>> Here's my problem :
>> - I have the class NSCollectionStream which define ( for example )
>> #atEnd
>> - I have the class NSSubclassOfCollectionStream ( which is a suclass
>> of
>> NSCollectionStream).
>>
>> When I use a trait in NSSubclassOfCollectionStream that required the
>> method
>> #atEnd, the defintion in NSCollectionStream is not used and the  
>> method
>> #atEnd is overridden with :
>>      atEnd
>>          self explicitRequirement.
>>
>> I think we should take care about definitions in superclass, no?
>> _______________________________________________
>> Pharo-project mailing list
>> Pharo-project@lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> Pharo-project@lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to