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.50.30.40 with SMTP id p8mr6056275igh.6.1400711398192; Wed, 21 May 2014 15:29:58 -0700 (PDT) X-Received: by 10.50.79.227 with SMTP id m3mr377448igx.3.1400711398118; Wed, 21 May 2014 15:29:58 -0700 (PDT) Path: border2.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!c1no13203856igq.0!news-out.google.com!qf4ni5721igc.0!nntp.google.com!c1no13203852igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 21 May 2014 15:29:57 -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: 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: Wed, 21 May 2014 22:29:58 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 2007 Xref: number.nntp.dca.giganews.com comp.lang.ada:186553 Date: 2014-05-21T15:29:57-07:00 List-Id: On Wednesday, May 21, 2014 3:09:00 PM UTC-7, Robert A Duff wrote: > Anyway, this: >=20 > function Class_Wide_Func (X : Integer) return T1'Class; -- currently l= egal >=20 > IS legal, and it CAN return an object whose tag is anything > in the class. The size in this case is determined at the > "return" in the body. "Anything" in the class--you mean anything that isn't an abstract type, I p= resume? (And yes, I understand you're making a point about the size not ne= eding to be known, and the reason we don't allow an abstract type to be ret= urned has nothing to do with the size.) -- Adam