help!!
Vassili Bykov
vassili at objectpeople.com
Wed Apr 15 02:52:07 UTC 1998
David Farber writes:
>
> today's puzzle is:
>
> Dictionary new
> at: (Set with: 1) put: 'is';
> at: (Set new add: 1; yourself) ifAbsent: ['isnot']
>
> why does this little snippet *sometimes* answer 'is' and *sometimes* answers
> 'isnot'?
Because Set reimplements #= but not #hash -- the classic one. (The
Dictionary, searching for a key which is #= but not hash-equal to the
stored one, sometimes hits the right bucket but more often misses).
--Vassili
--
Vassili Bykov vassili at objectpeople.com
The Object People http://www.objectpeople.com
+1(613)225-8812
"Any sufficiently complicated C or Fortran program contains an ad hoc
informally-specified bug-ridden slow implementation of half of Common Lisp."
-- Greenspun's Tenth Rule of Programming
More information about the Squeak-dev
mailing list
|