Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!m.cs.uiuc.edu!cs.uiuc.EDU!johnson From: johnson@cs.uiuc.EDU (Ralph Johnson) Newsgroups: comp.lang.smalltalk Subject: Re: PP Smalltalk R4 Query, Bug? Keywords: help Message-ID: <1991Mar8.140425.10863@m.cs.uiuc.edu> Date: 8 Mar 91 14:04:25 GMT References: <4931@goanna.cs.rmit.oz.au> Sender: news@m.cs.uiuc.edu (News Database (admin-Mike Schwager)) Reply-To: johnson@cs.uiuc.EDU (Ralph Johnson) Organization: University of Illinois Lines: 26 Paul mention asks about the fact that | aDictionary anAssociation | aDictionary := Dictionary new. anAssociation := #Three->3. aDictionary add: anAssociation. is different from | aDictionary | aDictionary := Dictionary new add: #Three->3. These expressions have always been different, because the add: messages for collections always returns the argument, not the receiver. Lot of people think that this is a design bug, but there *is* a reason for it. The reason is because of cascaded messaged. aCollection add: thing1; add: thing2; add: thing3 will only work if add: returns the receiver. Summary: the ParcPlace documentation was wrong, since the example is supposed to work the way to describe it, not the way the documentation said. Ralph Johnson -- University of Illinois at Urbana-Champaign