comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Issue with GNAT GPL 2009 and GtkAda
Date: Fri, 26 Jun 2009 10:52:27 +0200
Date: 2009-06-26T10:52:27+02:00	[thread overview]
Message-ID: <1hi0km5xe1802.17l3qjn1g9525$.dlg@40tude.net> (raw)
In-Reply-To: 4a44842e$0$31872$9b4e6d93@newsspool3.arcor-online.net

On Fri, 26 Jun 2009 10:17:49 +0200, Georg Bauhaus wrote:

> Dmitry A. Kazakov wrote:
> 
>> Access types are much overused in Ada in order to overcome language
>> problems unrelated to access types.
> 
> Another reason to overuse _anonymous_ access types is
> probably outside the language, but is present with language
> users:  anonymity provides for a reduction in perceived
> programmer typing cost which is a convincing motive
> to not use names in practice. I.e.
> 
>       type R is record
>         C1 : access T;   -- quick & risky
>         C2 : Float;
>       end record
> 
> is thought to bring less work.

One of the language problems is that the container types do not well
compose unconstrained types. Considering this one:

   type R is record
      C1 : T'Class;   -- does not work, considering an access type
      C2 : Float;
   end record

it should be allowed to do without access types, like:

   type R (Constraint : T'Range) is record
      C1 : T'Class (Constraint); -- Still class-wide, but constrained
      C2 : Float;
   end record

T'Range is a subtype of Ada.Tags.Tag:

   subtype T'Range is T'Tag...<the last tag of types derived from T>;

> Experience apparently shows that
> it doesn't, since the anonymity virus becomes activated sooner
> or later. (Judging by the number of reports of anonymous access
> issues.)

Yes. I think it is related to a more general issue of structural vs.
nominal type equivalence. I suspect that structural equivalence never pays
off. Ada, initially designed with nominal equivalence, swayed to the
structural one. Anonymous access types is the most prominent example of.
 
> Does "access T :=" really have 80/20 merits?

I would remove anonymous access types altogether, fixing the real language
problems, which led to introducing them in first place.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2009-06-26  8:52 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 21:52 Issue with GNAT GPL 2009 and GtkAda Damien Carbonne
2009-06-24  7:40 ` Dmitry A. Kazakov
2009-06-24 10:15 ` Stephen Leake
2009-06-25  9:06   ` Stephen Leake
2009-06-25  9:39     ` Dmitry A. Kazakov
2009-06-25 19:02       ` Damien Carbonne
2009-06-26  9:31         ` Stephen Leake
2009-06-26 11:18           ` Niklas Holsti
2009-06-26 16:29             ` Damien Carbonne
2009-06-26 17:28               ` Dmitry A. Kazakov
2009-06-26 19:27                 ` Damien Carbonne
2009-06-26 19:50                   ` Dmitry A. Kazakov
2009-06-26 21:51             ` Randy Brukardt
2009-06-27 11:11               ` Stephen Leake
2009-06-27 17:04                 ` Robert A Duff
2009-06-30 11:11                   ` Stephen Leake
2009-06-30 18:10                     ` Robert A Duff
2009-06-29 22:11                 ` Randy Brukardt
2009-06-30 11:13                   ` Stephen Leake
2009-06-30 15:26                     ` Adam Beneschan
2009-06-30 15:59               ` Adam Beneschan
2009-06-30 23:11                 ` Randy Brukardt
2009-06-27  9:56             ` Stephen Leake
2009-06-26 21:03           ` Damien Carbonne
2009-06-27 11:21             ` Stephen Leake
2009-06-27 12:25               ` Damien Carbonne
2009-06-27 12:35                 ` Damien Carbonne
2009-06-29 22:15                   ` Randy Brukardt
2009-07-01 19:22                     ` Damien Carbonne
2009-06-30  0:48             ` Adam Beneschan
2009-06-30 11:18               ` Stephen Leake
2009-06-25 20:49       ` Randy Brukardt
2009-06-26  7:20         ` Dmitry A. Kazakov
2009-06-26  8:17           ` Georg Bauhaus
2009-06-26  8:52             ` Dmitry A. Kazakov [this message]
2009-06-26 21:38               ` Randy Brukardt
2009-06-27  7:47                 ` Dmitry A. Kazakov
2009-06-29 21:59                   ` Randy Brukardt
2009-06-30  8:31                     ` Dmitry A. Kazakov
2009-06-26 21:31           ` Randy Brukardt
2009-06-27  7:53             ` Dmitry A. Kazakov
2009-06-26  8:39       ` Alex R. Mosteo
2009-06-26  9:07         ` Dmitry A. Kazakov
2009-06-27  9:53           ` Stephen Leake
2009-06-26 21:40         ` Randy Brukardt
2009-06-29 10:04           ` Alex R. Mosteo
2009-06-26  9:02       ` Stephen Leake
2009-06-26  9:14         ` Dmitry A. Kazakov
replies disabled

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