comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Pass a serial port as user data in a GTK callback handler?
Date: Tue, 18 Feb 2014 18:53:05 -0600
Date: 2014-02-18T18:53:05-06:00	[thread overview]
Message-ID: <le0v9m$bk1$1@loke.gir.dk> (raw)
In-Reply-To: wcc38jhl93l.fsf@shell01.TheWorld.com

"Robert A Duff" <bobduff@shell01.TheWorld.com> 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.




  reply	other threads:[~2014-02-19  0:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-15 23:32 Pass a serial port as user data in a GTK callback handler? hreba
2014-02-16  0:35 ` Jeffrey Carter
2014-02-16 16:18   ` hreba
2014-02-16  7:45 ` Niklas Holsti
2014-02-16 16:14   ` hreba
2014-02-16  9:20 ` Dmitry A. Kazakov
2014-02-16 16:57   ` hreba
2014-02-16 18:02     ` Dmitry A. Kazakov
2014-02-17 16:13 ` adambeneschan
2014-02-17 16:20   ` adambeneschan
2014-02-17 21:31     ` Robert A Duff
2014-02-19  0:53       ` Randy Brukardt [this message]
2014-02-19 22:22         ` Robert A Duff
2014-02-20  0:34           ` Randy Brukardt
2014-02-20 11:07             ` Simon Wright
2014-02-20 16:11             ` 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