Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72888 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69692 invoked from network); 1 Mar 2014 15:08:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Mar 2014 15:08:16 -0000 Authentication-Results: pb1.pair.com header.from=pjsturgeon@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pjsturgeon@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.48 as permitted sender) X-PHP-List-Original-Sender: pjsturgeon@gmail.com X-Host-Fingerprint: 209.85.215.48 mail-la0-f48.google.com Received: from [209.85.215.48] ([209.85.215.48:38963] helo=mail-la0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 42/00-03854-ED7F1135 for ; Sat, 01 Mar 2014 10:08:15 -0500 Received: by mail-la0-f48.google.com with SMTP id gf5so3485583lab.21 for ; Sat, 01 Mar 2014 07:08:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZHX8NTUCzQq7Lu1zyKb8fs5/ufUE6DKDFG+5rTv66No=; b=Ql+Qk0MP7GblXTNOLgzqx6EOmyu2HpgSAeBfs7Qsc8tL9UpBjBLhwtCO9EcaCS5DIq ci0eOihPE/8UAosF0nL5cjYIKjWQL7eF70xaDLWPvtvUJShK4mKp9YnRwdY6c254Tlc6 IsLayYXTMzesgUt/m68qQKeEaECZ8G1J2j5UvKIp2UFygS1RRoO4S2miigBCUi4joYGM 7TU3ZVqg+o6XsnuJhlwLQJH2i0T4iO2bI49ThPbd1MBS9SfBsCtEJBXXpP37FtsCojnj rnJtJ50B73j8Ev+f+k0sU8xHq5XMmRvXoG/NtbxSBNyu3KHHprS5nsEDnl74nz1pcgbX SeUw== MIME-Version: 1.0 X-Received: by 10.112.85.6 with SMTP id d6mr15157935lbz.8.1393686492019; Sat, 01 Mar 2014 07:08:12 -0800 (PST) Received: by 10.114.66.44 with HTTP; Sat, 1 Mar 2014 07:08:11 -0800 (PST) In-Reply-To: References: <37A9BBE2-1D9C-4715-9942-EF064476170F@ajf.me> Date: Sat, 1 Mar 2014 10:08:11 -0500 Message-ID: To: Adam Harvey Cc: Andrea Faulds , Bob Weinand , PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [VOTE][RFC] Array Of From: pjsturgeon@gmail.com (Philip Sturgeon) On Fri, Feb 28, 2014 at 1:00 PM, Adam Harvey wrote: > On 28 February 2014 09:45, Andrea Faulds wrote: >> >> On 28 Feb 2014, at 17:30, Bob Weinand wrote: >>> I voted no now. >>> >>> a) This is something for PHP6 I feel (at least if the other RFCs were rejected for similar reasons) >>> b) We are so close to beta 5.6 now, I think we should stop introducing bigger features which affect the language etc. now >>> c) I'm not really sure if we want that feature... but that's another story... >> >> >> I also voted against. I don't like the [] syntax and PHP 5.6 is too close. > > I was also -1, partly for those reasons, but also because I think we > need to take some time (probably in a PHP 5++/6/7/whatever context and > after 5.6 has been frozen) to figure out if we want generics and, if > so, what form they would take syntactically. My guess is that they > won't look anything like ClassName[], and I don't really want another > weird syntax appendix that we have to maintain and document for a > decade or more to come. > > Adam The trouble with that approach is that we could have this feature now. It would be useful to many (my twitter feed is blowing up over this one) and would be very simple for people to understand. It's been simple to implement and it's just all-round simple. Generics on the other hand are somewhat less simple, we need to work out templates and all that other fun stuff, and we need to work out if people even want the feature. Behind the scenes there is a LOT of code to change and things will have to have a major overhaul. So in the end we could miss out on adding a great feature that plenty of people want purely to find out that nobody wanted generics anyway. This should not even be seen as a rush to implement a weak version that ruins things and gives us a weird double syntax. It should be seen as a simple version then if later on generics are implemented they are a much more powerful feature which has a different syntax. People can use [] without ever having to understand the complexity of generics and templates and all that. At this point suggesting we shouldn't have [] and should make everyone use generics feels a little bit like banning fishing rods but handing out grenades.