[Newbies] Smalltalk is a Mystery to Me

Herbert König herbertkoenig at gmx.net
Fri Aug 22 16:39:16 UTC 2008


Hello Charlie,

nobody replied yet, so for a start:

Tac> I have had a curiosity about Smalltalk for many years so I
Tac> recently downloaded and installed Squeak. That's when the trouble
Tac> began. I have written applications that deal bridge hands and
Tac> either display the hands on screen or save them in a couple of
Tac> different formats. I originally wrote the 'words' in Forth. I

while in Smalltalk you create classes but most importantly sent
messages between objects. That's quite a difference.

Tac> In Forth and Ruby, I was able to store the hands as a 2D
Tac> bit array, 4 suits and 13 bits. If the card was present the bit
Tac> was set. When I dealt the cards, the appropriate bits were set..

If you'll try it this way in the end you'll find Smalltalk is an
awkward language for that kind of program.

You need to think about Bridge in Bridge terms and then this will
translate nicely into Smalltalk objects and methods.

I suggest you Google for Squeak by example (free Book) so you get a
feel for Smalltalk

Sorry I know noting about Bridge but when you can show most parts of
that Smalltalk program to a bridge player and he will have no problem
following what the program does then you wrote a good Smalltalk
program. Bits in Arrays of Bytes don't fall into this category.


Hope someone who knows about Bridge chimes in.

-- 
Cheers,

Herbert   



More information about the Beginners mailing list