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/05 Message-ID: #1/1 X-Deja-AN: 474458790 X-NNTP-Posting-Host: jr-and-assoc.demon.co.uk:194.222.150.244 References: <$DL10CAsSgL3Iwj3@jr-and-assoc.demon.co.uk> <7gn7gr$fr5$1@nnrp1.dejanews.com> <7gq27t$vnd$1@nnrp1.deja.com> X-Trace: news.demon.co.uk 925935854 nnrp-08:15468 NO-IDENT jr-and-assoc.demon.co.uk:194.222.150.244 MIME-Version: 1.0 Newsgroups: comp.lang.ada X-Complaints-To: abuse@demon.net Date: 1999-05-05T00:00:00+00:00 List-Id: In article <7gq27t$vnd$1@nnrp1.deja.com>, Robert Dewar writes >In article , > John Robinson wrote: > >> Hence, a mapping from UML to Ada 95 should always map a single UML class >> box onto a package containing a single tagged type. Although the >> language allows multiple tagged types to be declared in a single package >> it makes no sense whatsoever to do so. > >This is very wrong. In fact I would say that you have essentially completely >missed one of the most powerful features of Ada, namely that the packages >and tagged types need NOT be in 1-1 correspondence. No I didn't miss this fact. I choose to implement a one-to-one mapping, and judging by a quick review of my bookshelf I am in good company. >You sound like a C++ >programmer trying to squeeze the paradigms you are used to into Ada 95 in >an ugly and very unnatural way. Fancy being accused of being a C++ programmer, there is a first time for everything :-) >Very often putting multiple types into a single package solves in a neat and >clean way nasty problems that simply don't have neat solutions in other >languages. Such as? The use (in general) of one "major" type per package goes back to my earliest days with Ada 83, and is of course inherent in Booch's original "Software Engineering with Ada" text which was so influential in the adoption of ADT-based programming in the Ada world. This approach, which I have (so far) successfully carried over into Object Oriented Ada 95 code, brings a number of benefits (e.g. straightforward traceability between analysis and code, very clear separation of concerns etc). However, I am open to other approaches, if the benefits are clear. > >You are tieing BOTH hands behind your back if you adopt this completely >unnecessary and damaging restriction. I would be very interested in seeing a specific example of why this is damaging. Perhaps a specific reference to the patterns archive cited by Mathew? > >-----------== Posted via Deja News, The Discussion Network ==---------- >http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own -- John Robinson John Robinson & Associates www.jr-and-assoc.demon.co.uk