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,45abc3b718b20aa3,start X-Google-Attributes: gid103376,public From: vsnyder@math.jpl.nasa.gov (Van Snyder) Subject: Two ideas for the next Ada standard Date: 1996/08/28 Message-ID: <5009h5$ir4@netline-fddi.jpl.nasa.gov>#1/1 X-Deja-AN: 176901453 organization: Jet Propulsion Laboratory content-type: text/plain; charset=US-ASCII mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-08-28T00:00:00+00:00 List-Id: 1. Allow the "mode" of an "access to procedure" or "access to function" formal argument to be "limited". Interpret this to mean "you can only use this argument to access the subprogram, or pass it as an actual argument to a formal argument of `limited' mode." This would prevent one from storing the "pointer" into an "access to procedure" variable, and thereby allow safely passing internal procedures as actual arguments. 2. Allow an "out" "mode" for variables in specification parts, or fields in records. The interpretation is that any one can read the variables, but only procedures in (or the initialization part of) the body of the package can write them, or pass them to other than "in" mode formal arguments in different packages. Given this, one can safely expose variables containing values one wishes to expose, but to which one does not want to permit willy-nilly changes, without the need to write a one-line function. -- What fraction of Americans believe | Van Snyder Wrestling is real and NASA is fake? | vsnyder@math.jpl.nasa.gov