Hi. Could someone confirm me how I can know of two values match in squeak? Thanks.
François THIMON wrote:
Hi. Could someone confirm me how I can know of two values match in squeak? Thanks.
Have you looked at this
http://minnow.cc.gatech.edu/squeak/1843
?
I've already been watching so many pages from this site that I may have forgotten this one (or maybe I read it so long time ago that I can't remember...).
Thanks anyway!
François THIMON wrote:
I've already been watching so many pages from this site that I may have forgotten this one (or maybe I read it so long time ago that I can't remember...).
Thanks anyway!
Well these things are utterly explained in any good Smalltalk book. Take one, read it in confort and then you will not be dependent on the random information you find on the net or someone gives you. The page I've recommended doesn't contain all the information, of course. But may be sufficient for the beginning.
You might also perhaps take a look at the implementation of the Complex class (it is in 3.9 image, not in 3.7 I think). Look at how and why they overloaded the
=
method. Note that when on overloads the = method, he/she also needs to overload the `hash' method. This is not on the page. It is related to the Dictionary class. Any object may be a key there and it is higly desirable that two perhaps non-identical but equivalent objects denote the same key. Play with the Complex (as a key) and a Dictionary.
Well received!! I'll watch this if I ever need such complicated things. Thanks for the guidance.
François THIMON a écrit :
Well received!! I'll watch this if I ever need such complicated things. Thanks for the guidance.
François, read one of the book available here : http://www.iam.unibe.ch/~ducasse/FreeBooks.html for example Smalltalk by example.
-- oooo Dr. Serge Stinckwich OOOOOOOO Université de Caen>CNRS UMR 6072>GREYC>MAD OOESUGOO http://purl.org/net/SergeStinckwich oooooo Smalltalkers do: [:it | All with: Class, (And love: it)] \ / ##
Merci Monsieur!! Je vous assure que j'écoutais pendant vos cours mais ça remonte à longtemps et mon cahier de squeak reste à la maison pendant la journée. Bonnes vacances!!
squeak-dev@lists.squeakfoundation.org