From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5394d9ca5f955366 X-Google-Attributes: gid103376,public From: Francois Godme Subject: Re: pointers & OOP Date: 1999/05/05 Message-ID: <3730AA82.5F5BFBEE@magic.fr>#1/1 X-Deja-AN: 474458791 Content-Transfer-Encoding: 7bit References: <$DL10CAsSgL3Iwj3@jr-and-assoc.demon.co.uk> <7gn7gr$fr5$1@nnrp1.dejanews.com> X-Client: Magic On Line [unknown@ppp-167.net2.magic.fr] X-Accept-Language: fr Content-Type: text/plain; charset=us-ascii Organization: very little Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-05-05T00:00:00+00:00 List-Id: Robert Dewar wrote: > In article <$DL10CAsSgL3Iwj3@jr-and-assoc.demon.co.uk>, > John Robinson wrote: > > > I still stand by the assertion that to do a full OO application you will > > need to use pointers (smart or otherwise) somewhere along the line. > > Yes, you can hide the implementation detail (and you should) but you > > will still need them. > > You can assert anything, and you can stand by it, but that does not make > it so. Please give some idea of why you think this. It seems plainly obvious > to me that you can do full object oriented programming without pointers, and > indeed I find pointers and OO to be pretty much orthogonal concepts, and so > it is not surprising that they are orthogonal language features. > > Yes, closures need pointers, but we don't need closures for many kinds of > OO programming! > > -----------== Posted via Deja News, The Discussion Network ==---------- > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own You can perfectly avoid pointers when you build new classes by aggregating instances of concrete classes but are forced to use pointers with instances of unknown concrete subclasses of known abstract classes. For instance, let's say you want to design a set of widgets, you can abstract the window class and provide two concrete implementations of the window class, one for the Xlib, one for Win32. The Widget class will have a window'class pointer as it tries to avoid to know the exact details of the actual window.