comp.lang.ada
 help / color / mirror / Atom feed
From: John Robinson <john@jr-and-assoc.demon.co.uk>
Subject: Re: pointers & OOP
Date: 1999/05/05
Date: 1999-05-05T00:00:00+00:00	[thread overview]
Message-ID: <kfgz+IAjeKM3EwgM@jr-and-assoc.demon.co.uk> (raw)
In-Reply-To: 7gq27t$vnd$1@nnrp1.deja.com

In article <7gq27t$vnd$1@nnrp1.deja.com>, Robert Dewar <robert_dewar@my-
dejanews.com> writes
>In article <MVsZ8DAT0AM3EwF3@jr-and-assoc.demon.co.uk>,
>  John Robinson <john@jr-and-assoc.demon.co.uk> 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




  reply	other threads:[~1999-05-05  0:00 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-01  0:00 pointers & OOP Matthew Heaney
1999-05-01  0:00 ` Matthew Heaney
1999-05-03  0:00 ` John Robinson
1999-05-03  0:00   ` Samuel Mize
1999-05-04  0:00     ` Martin C. Carlisle
1999-05-04  0:00     ` Robert Dewar
1999-05-04  0:00   ` Robert Dewar
1999-05-04  0:00     ` Mike Silva
1999-05-05  0:00     ` John Robinson
1999-05-05  0:00       ` Robert Dewar
1999-05-08  0:00         ` Ehud Lamm
1999-05-05  0:00       ` Matthew Heaney
1999-05-05  0:00       ` Robert Dewar
1999-05-05  0:00         ` John Robinson [this message]
1999-05-06  0:00           ` Brian Rogoff
1999-05-07  0:00             ` dennison
1999-05-07  0:00               ` Brian Rogoff
1999-05-10  0:00                 ` dennison
1999-05-11  0:00                   ` Jean-Pierre Rosen
1999-05-11  0:00                     ` dennison
1999-05-10  0:00             ` John Robinson
1999-05-14  0:00               ` Matthew Heaney
1999-05-14  0:00                 ` David Botton
1999-05-14  0:00           ` Matthew Heaney
1999-05-14  0:00             ` Ed Falis
1999-05-06  0:00       ` Tom Moran
1999-05-06  0:00         ` John Robinson
1999-05-06  0:00           ` Tom Moran
1999-05-07  0:00             ` dennison
1999-05-07  0:00             ` dennison
1999-05-07  0:00             ` dennison
1999-05-10  0:00             ` John Robinson
1999-05-14  0:00         ` Matthew Heaney
1999-05-06  0:00       ` Simon Wright
1999-05-06  0:00         ` John Robinson
1999-05-08  0:00           ` Simon Wright
1999-05-10  0:00             ` John Robinson
1999-05-05  0:00     ` Francois Godme
  -- strict thread matches above, loose matches on Subject: below --
1999-05-01  0:00 Tom Moran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox