Newsgroups: comp.lang.smalltalk Path: utzoo!utgpu!cunews!white From: white@scs.carleton.ca (Paul White) Subject: Re: PP Smalltalk R4 Query, Bug? Message-ID: <1991Mar12.192911.28770@ccs.carleton.ca> Sender: news@ccs.carleton.ca (news) Organization: School of Computer Science, Carleton University, Ottawa, Canada References: <4931@goanna.cs.rmit.oz.au> <1991Mar8.140425.10863@m.cs.uiuc.edu> <1991Mar11.170449.1386@cua.cary.ibm.com> Date: Tue, 12 Mar 1991 19:29:11 GMT Just to add my 2 cents worth, a more probable explanation for the semantics of the add: (and at:put:) message returning the arguement as opposed to the receiver is to keep it consistent with the remove: protocol. Consider this: since when you 'pop' an item from a stack you expect to get the popped item back, why shouldn't you get the 'pushed' item back when you send a push: message. The semantics should be the same for all collections, be it stacks or dictionaries. Paul White white@scs.carleton.ca