comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Suggestion: Allow functions returning abstract types in certain situations
Date: Sat, 24 May 2014 14:45:42 -0400
Date: 2014-05-24T14:45:42-04:00	[thread overview]
Message-ID: <wccoayndnhl.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: fda3fecb-98ab-45ad-af8d-4584cae78be6@googlegroups.com

(sorry for email; I meant to post)

Adam Beneschan <adambeneschan@gmail.com> writes:

> On Wednesday, May 21, 2014 4:19:21 PM UTC-7, Robert A Duff wrote:
>
>> Not sure what you mean about "redispatch".  You can't [re]dispatch
>> without converting to class-wide.
>
> It didn't occur to me until later that your idea about forbidding a
> conversion from an abstract type to a class-wide type has to be a
> run-time check, not a compile-time check (or not solely a compile-time
> check).  Otherwise, if an operation of a concrete type converts a
> controlling parameter to a class-wide type, and then an abstract type
> is derived without overriding the operation, the code would then be
> converting the abstract object to a class-wide type unless it were
> checked at run-time.
>
> That's the sort of scenario I was thinking of when I mentioned
> Initialize/Adjust/Finalize doing a redispatch.

Ah, I see.  That's essentially the same as Dmitry's point 2.
I don't think it's specific to I/A/F.  Yes, it could be a
run-time check, but I'd much prefer a compile-time check,
even if it's rather restrictive.  Currently, dangling dispatch
is prevented by compile-time rules, and I'd like to keep it
that way.

- Bob

      reply	other threads:[~2014-05-24 18:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-21 14:52 Suggestion: Allow functions returning abstract types in certain situations Victor Porton
2014-05-21 16:10 ` Adam Beneschan
2014-05-21 19:09   ` Dan'l Miller
2014-05-21 22:09     ` Robert A Duff
2014-05-21 22:29       ` Adam Beneschan
2014-05-21 22:04   ` Robert A Duff
2014-05-21 22:33     ` Adam Beneschan
2014-05-21 23:19       ` Robert A Duff
2014-05-22  7:22         ` Dmitry A. Kazakov
2014-05-24 18:39           ` Robert A Duff
2014-05-24 19:20             ` Dmitry A. Kazakov
2014-05-22 14:47         ` Adam Beneschan
2014-05-24 18:45           ` Robert A Duff [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