Ideas for a refactoring with traits?

Jason Johnson jason.johnson.081 at gmail.com
Thu Sep 6 16:27:50 UTC 2007


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".  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.
In either case I would take the traditional approach, as using traits
in these cases makes it look like unneeded duplication of features.

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