Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71286 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77196 invoked from network); 19 Jan 2014 23:20:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jan 2014 23:20:03 -0000 X-Host-Fingerprint: 188.29.165.115 188.29.165.115.threembb.co.uk Received: from [188.29.165.115] ([188.29.165.115:23328] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/B3-61840-3AD5CD25 for ; Sun, 19 Jan 2014 18:20:03 -0500 To: internals@lists.php.net,Sara Golemon Message-ID: <52DC5D9C.9090500@php.net> Date: Sun, 19 Jan 2014 23:19:56 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 References: <52DC125C.4010609@ajf.me> <52DC4F86.6030000@php.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 188.29.165.115 Subject: Re: [PHP-DEV] Introducing "Array Of" RFC From: krakjoe@php.net (Joe Watkins) On 01/19/2014 10:49 PM, Sara Golemon wrote: >> Was there some technical difficulty that stopped the work on >> generics when it was first brought up, or did you just realize that it would >> never get through ?? >> > A little from column A, a little from column B. > > None of the technical challenges were insurmountable, but the > temperature for Generics felt tepid at the time (not nearly a 2/3 > majority), so it was back-burnered for more productive stuff. Reckon > the mood has changed in the past year or so? > > -Sara > I'm not really sure that it has, and if it has, it's only because people view it as an overhead free way of achieving what we set out to achieve here, even though its not really, the actual type hint would be ... I digress ... I don't really think anyone is thinking it through ... When you think about it, we couldn't just introduce generics right now, we have an incomplete type hinting system and it's terribly inconsistent for new HashMap() to be valid but not have the ability to hint for int or string elsewhere. It could be done, but it seems ... horrible ... I really think scalar hints have to be supported before generics, and there are so many patches for that and even more opinions, I'm not even sure we are capable of coming to the right decision, we haven't yet, the correct patch for scalar hinting exists, has done for a while ... To a lesser extent, you would want return type hints too, if nothing other than to give the compiler every opportunity to detect inconsistency in the actual use of generics before we get as far as execution. That said, I'd love it, quite happily will put time into working on any of the things I mentioned, but I have literally no idea how to change minds ... Any, or all of the things I just said are not small changes, aimed at introducing completely alien concepts, alien both to the language and the people using PHP ... a completely new programming paradigm, that's really not what we were going for at all here, a simple type hint was all. I know you know all of what I just said, but for those reading .. Cheers Joe