comp.lang.ada
 help / color / mirror / Atom feed
From: robert_dewar@my-dejanews.com
Subject: Re: How do I get this to work??
Date: 1999/01/10
Date: 1999-01-10T00:00:00+00:00	[thread overview]
Message-ID: <77b9cp$5kh$1@nnrp1.dejanews.com> (raw)
In-Reply-To: x7vpv8pkjtt.fsf@pogner.demon.co.uk

In article <x7vpv8pkjtt.fsf@pogner.demon.co.uk>,
 warwicks@telusplanet.net (Chris Warwick) writes:

> I've got it working... My uneasyness stems from the >fact
> that when I ran into unchecked_conversion I was able to
> get someone to explain to me how it really was "supposed"
> to work, and once I understood, I agreed. Thus far I
> still do not understand how a package can export
> a "useful" pointer definition...

But this problem only arises for the unusual case of
aliased variables, which normally should be used only
for interfacing to foreign routines, where the use of
unchecked_access is entirely appropriate.

I notice that a lot of people, especially former C
programmers greatly overuse aliased variables. There
was a reason for completely excluding such variables
from the Ada 83 language, and good practice in Ada 95
is to absolutely minimize their use.

Certainly the idea that a package is not useful because
it requires the use of Unchecked_Access for the unusual
case of using aliased variables represents an entirely
inappropriate viewpoint for the Ada 95 world.

Remember that aliased variables were introduced for
limited purposes in Ada 95, if you find yourself making
everything aliased, you are probably not organizing
things in an appropriate manner.

For example, even in the case of calls to interfaced
routines, we far prefer to pass IN or IN OUT parameters
by reference than to pass pointers as a general rule.

Robert Dewar

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




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

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-04  0:00 How do I get this to work?? Chris Warwick
1999-01-05  0:00 ` Chris Warwick
1999-01-05  0:00   ` Stephen Leake
1999-01-05  0:00     ` Tom Moran
1999-01-06  0:00       ` robert_dewar
1999-01-06  0:00         ` Tom Moran
1999-01-07  0:00           ` robert_dewar
1999-01-07  0:00             ` Tom Moran
1999-01-10  0:00               ` robert_dewar
1999-01-06  0:00         ` Larry Kilgallen
1999-01-06  0:00           ` Tom Moran
1999-01-06  0:00         ` Tom Moran
1999-01-07  0:00           ` robert_dewar
1999-01-07  0:00             ` Tom Moran
1999-01-10  0:00               ` robert_dewar
1999-01-10  0:00                 ` Tom Moran
1999-01-10  0:00                   ` robert_dewar
1999-01-10  0:00                     ` Pat Rogers
1999-01-10  0:00                     ` Tom Moran
1999-01-10  0:00                   ` robert_dewar
1999-01-06  0:00     ` Chris Warwick
1999-01-06  0:00       ` Tom Moran
1999-01-07  0:00       ` robert_dewar
1999-01-09  0:00         ` Chris Warwick
1999-01-09  0:00           ` Brian Rogoff
1999-01-10  0:00             ` Matthew Heaney
1999-01-09  0:00           ` Simon Wright
1999-01-10  0:00             ` robert_dewar [this message]
1999-01-11  0:00               ` Simon Wright
1999-01-16  0:00               ` Chris Warwick
1999-01-16  0:00                 ` Matthew Heaney
1999-01-16  0:00                   ` robert_dewar
1999-01-18  0:00                   ` Chris Warwick
1999-01-18  0:00                     ` Matthew Heaney
1999-01-18  0:00                     ` robert_dewar
1999-01-18  0:00                       ` Tucker Taft
1999-01-19  0:00                         ` Chris Warwick
1999-01-19  0:00                           ` Tom Moran
1999-01-19  0:00                           ` robert_dewar
1999-01-20  0:00                             ` Jeff Carter
1999-01-20  0:00                               ` robert_dewar
1999-01-21  0:00                                 ` Chris Warwick
1999-01-19  0:00                           ` Stephen Leake
1999-01-18  0:00                       ` dennison
1999-01-18  0:00                     ` dennison
1999-01-16  0:00                 ` robert_dewar
1999-01-18  0:00                   ` Chris Warwick
1999-01-18  0:00                     ` Matthew Heaney
1999-01-16  0:00                 ` Simon Wright
1999-01-07  0:00       ` Stephen Leake
1999-01-08  0:00         ` Simon Wright
1999-01-06  0:00     ` robert_dewar
1999-01-06  0:00   ` Simon Wright
1999-01-22  0:00   ` Nick Roberts
1999-01-05  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