comp.lang.ada
 help / color / mirror / Atom feed
From: "Alejandro R. Mosteo" <alejandro@mosteo.com>
Subject: Re: interfaces and limited/controlled/limited-controlled types
Date: Wed, 31 Jan 2018 12:54:46 +0100
Date: 2018-01-31T12:54:46+01:00	[thread overview]
Message-ID: <p4saq6$err$1@dont-email.me> (raw)
In-Reply-To: <p4h8pb$cui$1@franka.jacob-sparre.dk>

On 27/01/18 08:12, Randy Brukardt wrote:
> "Alejandro R. Mosteo" <alejandro@mosteo.com> wrote in message
> news:p4f2oa$c4u$1@dont-email.me...
> ...
>> I just was lamenting myself recently for not recalling this idea for the
>> next revision. Just add new interfaces with the same semantics.
> 
> That would probably work for Root_Storage_Pool and Root_Streams as these
> generally don't have any associated implementation.
> 
> For controlled, however, a common implementation strategy is to build the
> overhead into the root type (the chaining components that are common to all
> controlled object). Interfaces can't have components, and the work to allow
> that in this one case is roughly equivalent to allowing all interfaces to
> have components (which of course is full multiple inheritance -- which would
> make Dmitry happy :-). I don't see any point in doing a massive amount of
> work inside the compiler and not letting users have access to it. So it
> essentially is full MI or bust here (and I personally vote for bust :-).

I understand now, thanks. I had considered the user side POV only, 
thinking that some "compiler magic" would be involved, but certainly 
didn't suspect it would be so big a change.

Thanks,
Alex.

> 
>> I wonder if there are technical problems besides having a duplicated
>> feature.
> 
> If there is any concrete implementation associated with the root type, then
> an interface is not a useful replacement. You would need multiple
> inheritance to work for abstract types (in which case interfaces are a junk
> redundant feature). Most likely, existing vendors would just forget about
> upgrading their compilers (that seems to be the case for some vendors
> anyway, wouldn't want to make it a perfect sweep :-).
> 
>                                       Randy.
> 
> 

      parent reply	other threads:[~2018-01-31 11:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25 16:21 interfaces and limited/controlled/limited-controlled types Mehdi Saada
2018-01-25 22:00 ` Robert Eachus
2018-01-26  4:58 ` Randy Brukardt
2018-01-26  8:28   ` Dmitry A. Kazakov
2018-01-26 11:17     ` Alejandro R. Mosteo
2018-01-27  7:12       ` Randy Brukardt
2018-01-27 14:04         ` Jere
2018-01-27 14:38           ` Dmitry A. Kazakov
2018-01-27 18:28             ` Jere
2018-01-29 23:05               ` Randy Brukardt
2018-01-29 23:03             ` Randy Brukardt
2018-01-31 11:54         ` Alejandro R. Mosteo [this message]
replies disabled

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