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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Pass a serial port as user data in a GTK callback handler? Date: Tue, 18 Feb 2014 18:53:05 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <050a1b45-c312-4fff-96f9-7c3d01466500@googlegroups.com> <58fb9abc-1892-4a36-9895-c494dbc727c9@googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1392771192 11905 69.95.181.76 (19 Feb 2014 00:53:12 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 19 Feb 2014 00:53:12 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: number.nntp.dca.giganews.com comp.lang.ada:184989 Date: 2014-02-18T18:53:05-06:00 List-Id: "Robert A Duff" wrote in message news:wcc38jhl93l.fsf@shell01.TheWorld.com... > adambeneschan@gmail.com writes: > >> To expound on this a bit, since you mentioned you were overwhelmed by >> the complexity of the language: This particular inconsistency is there >> because of backward compatibility. Ada 83 did not have access types >> that could point to variables, nor did it have anonymous access types. >> Those were added in 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 to 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"; in order not to break >> existing Ada 83 programs, the "access all" type was added, which I'm >> sure they hated having to do... > > We didn't have to do it, and Tucker didn't want to do it, but I > convinced him it was a good idea. I later realized I was wrong, > too late. Mea Culpa. Fascinating. I wouldn't consider that wrong; the problem is the inconsistency with anonymous access types (which would be easily solved by not introducing them in the first place. ;-). What Ada calls general access and pool-specific access types ought to be separated somehow. Requiring the representation of all access types to be the same would force pool-specific types to have a worse representation than otherwise necessary -- on the U2200, general access types had to include byte-pointers (for C compatibility), but pool-specific types could assume word alignment. That was a substantial performance difference. Janus/Ada also uses stronger checking on pool-specific types (for an access type using the standard pool, if the value isn't inside the pool, we raise an exception rather than trash memory). Can't do that for general access types. I suppose we could have used an aspect for the difference (if we had had aspects in 1993), but having legality depend on aspects is always a bit dodgy. Randy. Randy.