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: 103376,5a88548f1bcf3510 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.224.105.205 with SMTP id u13mr2760068qao.6.1353062446359; Fri, 16 Nov 2012 02:40:46 -0800 (PST) Received: by 10.49.63.69 with SMTP id e5mr789071qes.40.1353062446337; Fri, 16 Nov 2012 02:40:46 -0800 (PST) Path: gf5ni327qab.0!nntp.google.com!u2no1586302qal.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 16 Nov 2012 02:40:46 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=195.182.34.201; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S NNTP-Posting-Host: 195.182.34.201 References: <97a6946f-a707-4dd3-872b-9e851fcf9462@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <62ba75d8-8a6c-4d75-be37-3322f683714d@googlegroups.com> Subject: Re: Overring function and its returned type From: Maciej Sobczak Injection-Date: Fri, 16 Nov 2012 10:40:46 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Date: 2012-11-16T02:40:46-08:00 List-Id: W dniu czwartek, 15 listopada 2012 16:13:06 UTC+1 u=C5=BCytkownik Peter C. = Chapin napisa=C5=82: > I talked with some people in the Scala community and it turns out the=20 > reason for the restriction is related to overload resolution and=20 > ambiguity. Which have a very simple solution: report the problem when (and *only* when= ) there is a problem. > To illustrate let me start with a simple derivation class: > In that=20 > case which F is being overridden here? In the case of ambiguity, let the compiler inform you about that. The problem is that this single example is very artificial and represents s= ome corner case that might actually never materialize in any of our project= s. There are many more examples that are practical and do not hit any corne= r cases of overload resolution and that could be easily handled - and there= fore could become an added value in the type system. --=20 Maciej Sobczak * http://www.msobczak.com * http://www.inspirel.com