comp.lang.ada
 help / color / mirror / Atom feed
From: Ehud Lamm <mslamm@mscc.huji.ac.il>
Subject: Re: Function Calls by Address
Date: 1999/09/05
Date: 1999-09-05T00:00:00+00:00	[thread overview]
Message-ID: <Pine.A41.3.96-heb-2.07.990905184103.68624A-100000@pluto.mscc.huji.ac.il> (raw)
In-Reply-To: 7qt4dv$fp7$1@wanadoo.fr

On Sat, 4 Sep 1999, Jean-Pierre Rosen wrote:
|
|In short: there is certainly no definitive "best solution". The best
|recommendation is: "know the tools that are available, know their drawbacks
|and benefits, and choose the most appropriate for the task at hand on a case
|by case basis".
|

This is good advice. Knowing how to choose right is among the most
important qualities in any profession, esp. in SE.

But:

|Why not use a (child) package for that ? If the separate module needs to
|access global data from the package body. Note that if you are clever
|enough, you won't expose what the separate procedure needs not to see:
|
|package body pack is
|  -- data visible to the separate proc goes here
| procedure to_be_adjusted is separate;
|
| -- data not visible to the separate proc goes here
|...
|end pack;
|

I personally find this kind of idea problematic. This kind of thing is a
problem waiting to happen. Won't someone move lines arround, perhaps to
"tidy up" according to his coding style, thus breaking the code. 
Code that is dependent on exact order of declarations should be used only
when necessary and even than with great care. Of course if the relatedness
of the declarations is obvious the danger is lessened, but in this example
the connection may be subtle. 
I wouldn't go so far as to ban it - but I'd say "know how to choose," and
if you choose to do something like this, do your fellows a favour and
document!

Ehud Lamm     mslamm@pluto.mscc.huji.ac.il
http://purl.oclc.org/NET/ehudlamm  <== My home on the web





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

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-30  0:00 Function Calls by Address Craig Jameson
1999-08-30  0:00 ` Robert Dewar
1999-08-30  0:00 ` Robert Dewar
1999-08-31  0:00   ` Martin Gangkofer
1999-08-30  0:00 ` Marin David Condic
1999-08-30  0:00   ` Robert Dewar
1999-08-30  0:00   ` Marin David Condic
1999-08-30  0:00     ` Larry Kilgallen
1999-08-31  0:00 ` Matthew Heaney
1999-08-31  0:00 ` David Kristola
1999-09-01  0:00 ` Simon Wright
1999-09-02  0:00 ` Francois Godme
1999-09-03  0:00   ` Robert Dewar
1999-09-03  0:00     ` Francois Godme
1999-09-03  0:00       ` Simon Wright
1999-09-03  0:00       ` Robert Dewar
1999-09-03  0:00         ` Ted Dennison
1999-09-04  0:00           ` Jean-Pierre Rosen
1999-09-05  0:00             ` Ehud Lamm [this message]
1999-09-05  0:00             ` Matthew Heaney
1999-09-04  0:00         ` Brian Rogoff
1999-09-05  0:00           ` Robert Dewar
1999-09-05  0:00           ` Robert Dewar
1999-09-05  0:00           ` Robert Dewar
1999-09-03  0:00       ` Marin David Condic
1999-09-14  0:00         ` Robert I. Eachus
     [not found]           ` <wcc3dwgb7ii.fsf@world.std.com>
     [not found]             ` <37E81079.CC2566D9@mitre.org>
1999-09-22  0:00               ` Robert A Duff
1999-09-22  0:00                 ` Robert I. Eachus
1999-09-23  0:00                 ` Robert Dewar
1999-09-23  0:00                   ` Robert A Duff
1999-09-03  0:00       ` David C. Hoos, Sr.
1999-09-04  0:00         ` Robert Dewar
1999-09-05  0:00           ` Francois Godme
1999-09-06  0:00             ` Robert Dewar
1999-09-06  0:00               ` Francois Godme
1999-09-06  0:00                 ` Robert Dewar
1999-09-06  0:00                 ` Robert Dewar
1999-09-06  0:00                   ` Bob Collins
1999-09-07  0:00                     ` Pascal Obry
1999-09-07  0:00                 ` Pascal Obry
1999-09-07  0:00                   ` Francois Godme
1999-09-08  0:00                   ` Francois Godme
1999-09-04  0:00       ` Mario Klebsch
1999-09-05  0:00         ` Robert Dewar
1999-09-06  0:00           ` Francois Godme
1999-09-05  0:00             ` Brian Rogoff
1999-09-06  0:00             ` Robert Dewar
1999-09-08  0:00               ` Georg Bauhaus
1999-09-05  0:00       ` Geoff Bull
1999-09-07  0:00       ` Michael F. Yoder
replies disabled

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