comp.lang.ada
 help / color / mirror / Atom feed
From: gpriv@axonx.com
Subject: Re: Files and controlled types
Date: Sat, 8 Mar 2008 13:56:48 -0800 (PST)
Date: 2008-03-08T13:56:48-08:00	[thread overview]
Message-ID: <0658b07c-2fbf-4b0a-a06d-8e6aa753d5bf@p25g2000hsf.googlegroups.com> (raw)
In-Reply-To: 3bd96475-530b-46a7-9b07-11ea49105b2c@e31g2000hse.googlegroups.com

On Mar 8, 4:22 pm, Maciej Sobczak <see.my.homep...@gmail.com> wrote:
> Hi,
>
> File types are not Controlled.
> What is the rationale for this?
>
> I would think that types associated with external resources should be
> Controlled to facilitate resource management in the presence of
> exceptions - in this context the file types in the Ada standard
> library seem to be designed against this common policy.
>
> --
> Maciej Sobczak *www.msobczak.com*www.inspirel.com

Don't know about rationale (might be compatibility issue with Ada 83).
I use files mostly directly or as instantiated generics encapsulated
inside other classes (which may be derived from limited controlled) to
do automatic cleanup when needed.  Those are pretty much like C
FILEs.  I have issues with Root_Stream_Type being not controlled
type.  That seems to be bigger drawback.

Regards,

George Privalov





  reply	other threads:[~2008-03-08 21:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-08 21:22 Files and controlled types Maciej Sobczak
2008-03-08 21:56 ` gpriv [this message]
2008-03-09  3:12 ` Jeffrey R. Carter
2008-03-09 13:27   ` Maciej Sobczak
2008-03-10 15:37     ` Adam Beneschan
2008-03-10 21:45       ` Maciej Sobczak
2008-03-09 16:39   ` gpriv
2008-03-10 15:28 ` Eric Hughes
2008-03-10 22:45   ` Robert A Duff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox