Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79205 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36178 invoked from network); 26 Nov 2014 22:52:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Nov 2014 22:52:34 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.171 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.171 mail-wi0-f171.google.com Received: from [209.85.212.171] ([209.85.212.171:57725] helo=mail-wi0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 59/30-32666-1B956745 for ; Wed, 26 Nov 2014 17:52:33 -0500 Received: by mail-wi0-f171.google.com with SMTP id bs8so13992038wib.16 for ; Wed, 26 Nov 2014 14:52:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to :message-id; bh=EZ43Rfysb4NfVB8b+RC9io8d884+MBnt03iBn7srgJ8=; b=S5FOcpdXcZQDVN0UiA8WmaT9K8yG8BW426yaIJMjejOk8syCv3qiDr13Xywda4T4sD 2hxeWAI9o8/ssVyukas0uTIjX0eMpEn1GLrnXWF5oDMC+MMhUhq3/gTCXE6B8NxbdiKp sCZfB2HNkjkXIT8hIUJILWO7q9GHZ0riDh4OeTK51aUWkHoLaw9n4nAPquIWUOIPUCOO KUAM3lugyj0Ml6v0j12rkKr+1lDY4KG4jy+BFDJ9681ch+6yrax77sK6VGo8BxAv15Hj yHtmFz+s+z0Rv8V1FUdIPnGrpO8YyuQEm5/pgmAFX5Sjq6o+NLa/W6Otacpp128BHgJf y/jg== X-Received: by 10.194.184.199 with SMTP id ew7mr54005527wjc.85.1417042349086; Wed, 26 Nov 2014 14:52:29 -0800 (PST) Received: from [192.168.0.3] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id hs1sm22763092wib.1.2014.11.26.14.52.27 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Nov 2014 14:52:28 -0800 (PST) User-Agent: K-9 Mail for Android In-Reply-To: References: <5474EF98.8070602@mabe.berlin> <5474FF0C.4010405@mabe.berlin> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Wed, 26 Nov 2014 22:51:16 +0000 To: internals Message-ID: <683C1FE2-3CE0-4A13-9F76-A4E7BBD320C6@gmail.com> Subject: Re: [PHP-DEV] [RFC][Discussion] Return Type Variance Checking From: rowan.collins@gmail.com (Rowan Collins) On 26 November 2014 10:21:12 GMT, Lazare Inepologlou wrote: >http://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)#Covariant_method_return_type Can I just recommend that everyone interested in this discussion read that whole article (at least until it gets into the guts of generics, which gets more and more complex). It explains the concepts extremely clearly, both in their theoretical basis and their practical implementation and limitations. I often worry that PHP is designed too much around examples and use cases, rather than more formal theoretical foundations, so I'm pleased this conversation has led me to learn those concepts. Obviously, that article points out, there is sometimes value in ignoring the theoretically pure in favour of the practical, but the adage applies that you should first understand the rules before deciding to break them. Regards, -- Rowan Collins [IMSoP]