Ideas for a refactoring with traits?

stephane ducasse stephane.ducasse at free.fr
Sat Sep 8 18:40:43 UTC 2007


+ 1

Having traits is like having middle abstractions that we can reuse.  
So having them and learning from the case studies
is important.

Stef
On 6 sept. 07, at 18:51, Klaus D. Witzel wrote:

> On Thu, 06 Sep 2007 18:27:50 +0200, Jason Johnson wrote:
>
>> Yes, I would like to reiterate again:  If you want to get a success
>> story with traits the way to do it is not to simply cram them in
>> somewhere and say "see! used in practice".
>
> I'm not referring to the example I gave (and have still to check  
> Andreas suggestion) but,
>
> If nobody tries then the opposite "not found to be usable in  
> practice" is equally far away?
>
>>  In fact if that's all we
>> have of traits in the end they will be seen (rightfully so) as a
>> failure.
>>
>> So before using traits somewhere it should heavily be weighed if a
>> more traditional approach wouldn't work better or even just as well.
>
> Isn't that part&parcel of what Alejandro is about to find out.
>
>> In either case I would take the traditional approach, as using traits
>> in these cases makes it look like unneeded duplication of features.
>
> Both cases (with, w/o) traits can only be compared if both cases  
> exist?
>
> /Klaus
>
>> On 9/6/07, Andreas Raab <andreas.raab at gmx.de> wrote:
>>> Klaus D. Witzel wrote:
>>> > May I add, copy&paste via the clipboard (for example, from an  
>>> external
>>> > web browser) is sometimes not the same as opening a file from  
>>> Squeak's
>>> > host platform and asking for contentsOfEntireFile. Example  
>>> contents:
>>> >
>>> > - http://sigmakee.cvs.sourceforge.net/*checkout*/sigmakee/KBs/ 
>>> Geography.kif
>>> > - http://sigmakee.cvs.sourceforge.net/*checkout*/sigmakee/KBs/ 
>>> People.kif
>>>
>>> That would likely be because the default character encoding for  
>>> files
>>> (UTF-8) is  different from the default encoding of your web browser
>>> (ISO-8859-1). If you change this to say,
>>>
>>>         file := FileStream readOnlyFileNamed: 'People.kif'.
>>>         file converter: Latin1TextConverter new.
>>>         file contents.
>>>
>>> you should get the same result.
>>>
>>> Cheers,
>>>    - Andreas
>>>
>>>
>>
>>
>
>
>
>




More information about the Squeak-dev mailing list