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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ee2e271b166c2587 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!postnews.google.com!p25g2000hsf.googlegroups.com!not-for-mail From: gpriv@axonx.com Newsgroups: comp.lang.ada Subject: Re: Files and controlled types Date: Sat, 8 Mar 2008 13:56:48 -0800 (PST) Organization: http://groups.google.com Message-ID: <0658b07c-2fbf-4b0a-a06d-8e6aa753d5bf@p25g2000hsf.googlegroups.com> References: <3bd96475-530b-46a7-9b07-11ea49105b2c@e31g2000hse.googlegroups.com> NNTP-Posting-Host: 69.250.188.114 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1205013408 15945 127.0.0.1 (8 Mar 2008 21:56:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 8 Mar 2008 21:56:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p25g2000hsf.googlegroups.com; posting-host=69.250.188.114; posting-account=YaY8rAoAAAAAnFXOECY3BGVJsrvFJCgy User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20240 Date: 2008-03-08T13:56:48-08:00 List-Id: On Mar 8, 4:22 pm, Maciej Sobczak 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