[Newbies] Collection in Smalltalk

Bert Freudenberg bert at freudenbergs.de
Thu Sep 25 15:38:27 UTC 2008


Am 25.09.2008 um 08:33 schrieb Herbert König:

> Hello Randal,
>
>
> Herbert>> mySeparators := Array new: 13
> Herbert>> mySeparators at: 1 put: $- ; at: 2 put: $( .....
> Herbert>> and so on.
>
> RLS> You can just write that as a literal:
> RLS>   mySeparators := #($- $().
>
> actually yes but I really have 13 separators (ugly) and I may have
> done it that way if it were numbers.
>
> The first line even reads:
> mySeparators at: 1 put: ' ' asCharacter;
> so I understand the whole thing when I read it later. $. and $; makes
> me stumble and $  is on the verge of unreadable to me.
>
> Btw I just changed that to .. put: Character space.
> ' ' asCharacter is clear but it itches me to count the blanks anyway.
>
> Details, details :-))


In that case I'd suggest

	Character separators, '-('


- Bert -




More information about the Beginners mailing list