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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,5a88548f1bcf3510 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.224.219.144 with SMTP id hu16mr6586408qab.1.1352491041247; Fri, 09 Nov 2012 11:57:21 -0800 (PST) Received: by 10.236.143.241 with SMTP id l77mr1903543yhj.10.1352491041187; Fri, 09 Nov 2012 11:57:21 -0800 (PST) Path: gf5ni18188417qab.0!nntp.google.com!c7no14604222qap.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 9 Nov 2012 11:57:21 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=206.53.78.59; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy NNTP-Posting-Host: 206.53.78.59 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <97a6946f-a707-4dd3-872b-9e851fcf9462@googlegroups.com> Subject: Re: Overring function and its returned type From: sbelmont700@gmail.com Injection-Date: Fri, 09 Nov 2012 19:57:21 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-11-09T11:57:21-08:00 List-Id: More generally, you are talking about 'covariant return types', which is a = feature only a handful of languages support (notably C++). IMHO, i don't r= eally see the need for it; a type is either a child (and matches the parent= , as in P3) or it doesn't and it's not (as in P2). The whole point is to u= se the abstract parent classwide type exclusively, so I never saw the need = to tinker around with the concrete child types (i would be interested in a = real life scenario in which you would want this construct) -sb