From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.28.136 with SMTP id b8mr25728598obh.19.1400770039848; Thu, 22 May 2014 07:47:19 -0700 (PDT) X-Received: by 10.50.79.137 with SMTP id j9mr483314igx.15.1400770039765; Thu, 22 May 2014 07:47:19 -0700 (PDT) Path: border2.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!hl10no3478038igb.0!news-out.google.com!qf4ni5721igc.0!nntp.google.com!c1no13684410igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 22 May 2014 07:47:19 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=KSa2aQoAAACOxnC0usBJYX8NE3x3a1Xq NNTP-Posting-Host: 66.126.103.122 References: <06f66a19-00f1-405f-a517-05d18a021b65@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Suggestion: Allow functions returning abstract types in certain situations From: Adam Beneschan Injection-Date: Thu, 22 May 2014 14:47:19 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 2259 Xref: number.nntp.dca.giganews.com comp.lang.ada:186562 Date: 2014-05-22T07:47:19-07:00 List-Id: 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 convers= ion 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 cl= ass-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/A= djust/Finalize doing a redispatch. -- Adam