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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.52.53.73 with SMTP id z9mr9230785vdo.4.1392654049056; Mon, 17 Feb 2014 08:20:49 -0800 (PST) X-Received: by 10.50.22.211 with SMTP id g19mr335369igf.12.1392654048833; Mon, 17 Feb 2014 08:20:48 -0800 (PST) Path: border1.nntp.dca.giganews.com!nntp.giganews.com!k15no22192353qaq.0!news-out.google.com!h8ni16igy.0!nntp.google.com!c10no26685849igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 17 Feb 2014 08:20:48 -0800 (PST) In-Reply-To: <050a1b45-c312-4fff-96f9-7c3d01466500@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=KSa2aQoAAACOxnC0usBJYX8NE3x3a1Xq NNTP-Posting-Host: 66.126.103.122 References: <050a1b45-c312-4fff-96f9-7c3d01466500@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <58fb9abc-1892-4a36-9895-c494dbc727c9@googlegroups.com> Subject: Re: Pass a serial port as user data in a GTK callback handler? From: adambeneschan@gmail.com Injection-Date: Mon, 17 Feb 2014 16:20:48 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.dca.giganews.com comp.lang.ada:184939 Date: 2014-02-17T08:20:48-08:00 List-Id: On Monday, February 17, 2014 8:13:09 AM UTC-8, I wrote: > On Saturday, February 15, 2014 3:32:58 PM UTC-8, hreba wrote: > I agree with everyone else that anonymous access types aren't needed in t= his case, and you're better off using a named access type or something else= . Having said that, I just wanted to point out something about Ada: all an= onymous access types are automatically "access all", i.e. they can refer to= aliased variables. So you could have solved the problem by just removing = the "all" keyword. To expound on this a bit, since you mentioned you were overwhelmed by the c= omplexity of the language: This particular inconsistency is there because o= f backward compatibility. Ada 83 did not have access types that could poin= t to variables, nor did it have anonymous access types. Those were added i= n Ada 95. The Ada 95 designers decided that since Ada 83 access types didn= 't have to be implemented as addresses, it was necessary to have some way t= o distinguish between an access type that could point to a variable and an = access type that was required to point to something allocated with "new"; i= n order not to break existing Ada 83 programs, the "access all" type was ad= ded, which I'm sure they hated having to do (adding the extra keyword), but= sometimes there just isn't a good solution. =20 -- Adam