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: John Robinson Subject: Re: pointers & OOP Date: 1999/05/03 Message-ID: <$DL10CAsSgL3Iwj3@jr-and-assoc.demon.co.uk>#1/1 X-Deja-AN: 473635840 X-NNTP-Posting-Host: jr-and-assoc.demon.co.uk:194.222.150.244 References: X-Complaints-To: abuse@demon.net X-Trace: news.demon.co.uk 925763120 nnrp-02:24718 NO-IDENT jr-and-assoc.demon.co.uk:194.222.150.244 Organization: John Robinson and Associates MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-05-03T00:00:00+00:00 List-Id: In article , Matthew Heaney writes >John Robinson writes: > >> It is difficult to do anything really useful with Ada 95 OOP features >> without the use of pointers. > > >> Any collection class for example will need to use pointers, even if >> the collection is based around a fixed length array. > >Yes, a collection whose items have a class-wide type will require >pointer use. But you can use a smart pointer, so you don't have to >worry about any pointer manipulation headaches. Gives you the same as a >reference in other OO languages. > 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. I accept that one can also gain an advantage in many areas by using the OOP features to do individual jobs (such as the use of controlled types which Robert used as an example). I also accept that some parts of a system may be able to avoid pointers where other languages would need them (such as the factory method which you described). > >I don't think they'd disagree that Ada95 has better compile time >checking. The argument is, How important is compile-time checking to >the programmer? > >Most programmers are oblivious to the benefits of rigorous compile-time >checking, and many programmers actually like having bugs (because they >get to find them and fix them), so "Ada95 has better checking" is a >tough sell. I agree. The software profession will only become a profession when programmers accept that they have a job to do and are not paid to have "fun" whilst "playing" with their bugs! -- John Robinson John Robinson & Associates www.jr-and-assoc.demon.co.uk