Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bloom-beacon!clyde!concour!marcap From: marcap@concour.CS.Concordia.CA (Marc Pawlowsky) Newsgroups: comp.lang.eiffel Subject: Re: Request for your favorite OOP idea for possible implementation! Summary: wanted := consistency and full copy Keywords: OOP := clone copy deepCopy Message-ID: <859@clyde.Concordia.CA> Date: 29 May 89 23:53:39 GMT References: <3720@qut.edu.au> Sender: news@Clyde.Concordia.CA Reply-To: marcap@concour.CS.Concordia.CA (Marc Pawlowsky) Organization: Concordia University, Montreal Quebec Lines: 23 In article <3720@qut.edu.au> cszthomas@qut.edu.au writes: > I am currently involved in some research into adding OOP >extensions to modern modular languages. I would value any pertinent >ideas or theories that anyone might have as to the best manner of >doing this and exactly what should be implemented (eg. multiple >inheritance/single inheritance, etc.) My pet peeves are: 1) := is inconsistent. In both eiffel and Smalltalk := when applied to a primitive (integer, real, character, ...) automatically creates a new object, with the same value. Yet when := is used for a class it creates a reference to the same object. It would be nice if this inconsistency was cleared up, by having := always refer to the same object and not create a new one. 2) There is no true clone, deepCopy methods in either language. By this I mean a method that recursively returns a new object, with all the instances variables also cloned (deepCopy). This is often needed. While it is possible to create such a method, I think it should be part of the language definition. A simple operator should be used (e.g. <-, or :-).