From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Ada 95 constructors on limited types
Date: Mon, 7 Jan 2008 19:58:20 -0600
Date: 2008-01-07T19:58:20-06:00 [thread overview]
Message-ID: <flulc2$uqu$1@jacob-sparre.dk> (raw)
In-Reply-To: wccy7b4xqro.fsf@shell01.TheWorld.com
"Robert A Duff" <bobduff@shell01.TheWorld.com> wrote in message
news:wccy7b4xqro.fsf@shell01.TheWorld.com...
> But anyway, the purity issue applies to access types
> whether they are public or not. I agree that it's
> good to make things Pure when possible.
>
> Note that the rule was relaxed in Ada 2005 -- you can say:
>
> type T is access Blah;
> for T'Storage_Size use 0;
>
> and still have pragma Pure. You can also have access-to-constant
> and access-to-subprogram types.
Ummm, that isn't very useful (that's a type for which there never can be an
object!). I think you meant:
type T is access all Blah;
for T'Storage_Size use 0;
...which can be useful. But note that that the point of setting the storage
size to 0 is to make allocators illegal - which greatly restricts what you
can do. Better to avoid the access type altogether.
Randy.
next prev parent reply other threads:[~2008-01-08 1:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-02 14:31 Ada 95 constructors on limited types shaunpatterson
2008-01-02 14:49 ` Dmitry A. Kazakov
2008-01-02 16:02 ` Robert A Duff
2008-01-02 16:20 ` Jeffrey R. Carter
2008-01-02 22:57 ` Brian May
2008-01-02 23:53 ` Jeffrey R. Carter
2008-01-05 10:32 ` Ludovic Brenta
2008-01-05 14:59 ` Robert A Duff
2008-01-08 1:58 ` Randy Brukardt [this message]
2008-01-02 18:36 ` Martin Krischik
2008-01-04 1:38 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox