[squeak-dev] design issue of someone trying to think like a

Louis LaBrunda Lou at Keystone-Software.com
Wed Oct 17 17:46:28 UTC 2012


Hi Joe,

Take a look at all of the Smalltalk collection classes.  I'm not as
familiar with Squeak as other Smalltalks, so I can't tell you how to do
that in Squeak but I'm sure others can.

Smalltalk has classes like LookupTable and Dictionary where you can add
items with methods like #at:put: where the #at: part is a key and the #put:
part is a value.  You can retrieve the value with the #at: method.  There
are other methods like #do: that run the values.

I really like the Smalltalk collections classes and use them all the time.
They are unique to languages that treat blocks-of-code as objects and
allows them to be passed as parameters.  You can't do this in Java and
therefore you don't see the same level of powerful collection methods.

Lou

>Thanks for all your help.  I really appreciate being able to knock things about before I code.  And thanks for the code snippets I always find something useful in them.
>
>David spoke about a RDB and a Table object.  I have always thought a Table object would very handy to have in smalltalk.  But I never see it.  There is a Matrix.  Maybe that can be used.
>
>Or am I missing out on the power of defining my own arbitrary objects and just keeping them in a collection?
>
>Sincerely,
>
>Joe.
>
>
>
>
>
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com



More information about the Squeak-dev mailing list