From: Adam Beneschan <adambeneschan@gmail.com>
Subject: Re: Suggestion: Allow functions returning abstract types in certain situations
Date: Thu, 22 May 2014 07:47:19 -0700 (PDT)
Date: 2014-05-22T07:47:19-07:00 [thread overview]
Message-ID: <fda3fecb-98ab-45ad-af8d-4584cae78be6@googlegroups.com> (raw)
In-Reply-To: <wcctx8in2iu.fsf@shell01.TheWorld.com>
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.
-- Adam
next prev parent reply other threads:[~2014-05-22 14:47 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 [this message]
2014-05-24 18:45 ` 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