Thu, 10 Dec 1998 12:01:50 -0500
> nested procedures should sometimes
> be used when they are really macros, ....
By "really macros" do you mean something like the stuff below?
I have often made code much more readable by using nested procedures to
divide something into subtasks. It is not "factoring common code" since
each is only called once. They don't belong at package spec level because
no one else will (or should) call them.
Putting them at package body level offers what benefit? Emulating a
language that can't nest procedures? (I'd like to read the paper, but not
if I have to buy the proceedings. Is it online?)
Web search with the word "nesting" gets mostly hits on ornithology and
genealogy. :-) (Even if I add "Ada" and "Clarke")
procedure Trip is -- example
procedure Leave_For_Grandmas is -- could even be separate...
Drive_North (Blocks => 4);
Take_Onramp (Interstate => 95,
Direction => North);
procedure Go_To_Grandmas is-- could even be separate...
Avoid_Wolf; -- sorry, couldn't resist
procedure ... etc.
begin -- Trip
(Topics => (Manners, Fighting, Begging_For_Candy));