Subject: | |
From: | |
Reply To: | Robert I. Eachus |
Date: | Thu, 10 Dec 1998 10:14:56 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
> W. Wesley Groleau said:
>Some of the solutions to the "static variables" problem seem like an awful
>lot of engineering to emulate something that was poor engineering in the
>first place. :-)
There was an excellent paper on that subject many years ago: "Nesting in
Ada is for the birds" by Lori Clarke, et. al. (Presented at the SigAda
conference in 1982 in Washington DC, I think.) Of course, it covered more
than just
static variables. For those who haven't read it, the paper argues strongly
that you should almost never nested a subprogram declaration in Ada, you
should declare one or both subprograms in a package instead. Not because
nesting doesn't work, but because the package idiom is much better. Of
course, nowadays we know so much more--nested procedures should sometimes
be used when they are really macros, or often when instantiating
Unchecked_Deallocation or Unchecked_Conversion.
Robert I. Eachus
with Standard_Disclaimer;
use Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...
|
|
|