From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: formal array types and default values
Date: Mon, 8 Jan 2018 15:12:39 -0600
Date: 2018-01-08T15:12:39-06:00 [thread overview]
Message-ID: <p30ms7$h9t$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: fbaifmFd3gjU1@mid.individual.net
"Niklas Holsti" <niklas.holsti@tidorum.invalid> wrote in message
news:fbaifmFd3gjU1@mid.individual.net...
...
>> I forget the reason that we required staticness, but I think it had
>> something to do with when the default expression is evaluated.
>
> From the discussion in AI05-0228, it seems to be related also to type
> freezing: Robert Dewar reported "huge problems" implementing the
> Default_Value aspect, and Randy Brukardt replied: "The key is to
> note that as these have to be static expressions, they can't involve the
> creation of any default-initialized objects (no user-defined function
> calls). Thus, I would suggest that the best approach would be to handle
> Default_Value aspects immediately *after* freezing of the type (but before
> anything else that depends on freezing." ... "If there is anything that
> would be a problem, the checking for a static expression will catch it."
>
> However, I found no discussion in the AI re *why* the AI was initially
> written to require a static expression for Default_Value, nor why
> Default_Component_Value is limited to scalars.
My recollection was that it was more that the expressions involved had to be
very restricted in order to avoid problems (perhaps the problems were with
freezing). The easiest way to do that was to make the items static.
BTW, if you want to follow all of the design issues that are recorded, you
probably need to look at the meeting minutes as well as the AI. There is an
index of meeting discussions on AIs found on the ARG Minutes page
(http://www.ada-auth.org/arg-minutes.html).
Randy.
next prev parent reply other threads:[~2018-01-08 21:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-30 21:42 formal array types and default values Mehdi Saada
2017-12-30 22:20 ` Niklas Holsti
2017-12-30 23:59 ` Mehdi Saada
2018-01-03 0:52 ` Randy Brukardt
2018-01-03 8:33 ` Niklas Holsti
2018-01-03 20:53 ` Randy Brukardt
2018-01-06 0:10 ` Niklas Holsti
2018-01-08 21:12 ` Randy Brukardt [this message]
2017-12-31 12:34 ` Jeffrey R. Carter
2017-12-31 14:55 ` Mehdi Saada
2018-01-03 15:47 ` Mehdi Saada
2018-01-03 21:16 ` Randy Brukardt
2018-01-04 15:02 ` Mehdi Saada
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox