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,88e7ef9008757431 X-Google-Attributes: gid103376,public From: Ehud Lamm Subject: Re: Function Calls by Address Date: 1999/09/05 Message-ID: #1/1 X-Deja-AN: 521477946 References: <37CADE68.6AF06F5D@escmail.orl.lmco.com> <37CEEFFA.7D73F78D@magic.fr> <7qooh7$hbh$1@nnrp1.deja.com> <37CFFEA6.921CBE59@magic.fr> <7qp8sd$u8i$1@nnrp1.deja.com> <7qpd5b$1gg$1@nnrp1.deja.com> <7qt4dv$fp7$1@wanadoo.fr> Content-Type: TEXT/PLAIN; charset=US-ASCII Organization: The hebrew University of Jerusalem Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-09-05T00:00:00+00:00 List-Id: 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