Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63602 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3225 invoked from network); 22 Oct 2012 19:44:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2012 19:44:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.170 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:63908] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F2/E7-52508-C22A5805 for ; Mon, 22 Oct 2012 15:44:45 -0400 Received: by mail-lb0-f170.google.com with SMTP id gm13so2058940lbb.29 for ; Mon, 22 Oct 2012 12:44:40 -0700 (PDT) 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=MLOqmusBIcxc98QaB8S12ShAExGwlxmqXqEeTuBYTYo=; b=YqqdO07Dt6k6bAB7wtr6a6U9b1ghIQGK+sdlGXIDzC8H4NV4olF6okSf+cwoEWN2GO Dl3KE32/LTuqCdIzuTKTdfVjWz2YNKGYXKZ/t/5mKs/Zlhsf46ZcXkBEeTUkXXfXx8At fWYrjfOrdw7sSE7Lz1QpL2ycIkkhtONA7sHS3dI2HXfhjs/fiVdQzUcsGMUlBmIHdBYv IfSO5fnJOr/OPavXHIi2Ecrty27tsuV6wC+djGFXrrK+QgimR73WmAxBxnfM0gY/ujjL b2bmkyohWBk9VUWnmeECMFtuExXHLTUTnyfYNi+l4QdoSqrf581dzfaPGz/SV4AWpcgn A2ZA== MIME-Version: 1.0 Received: by 10.152.104.50 with SMTP id gb18mr9396267lab.9.1350935080795; Mon, 22 Oct 2012 12:44:40 -0700 (PDT) Received: by 10.114.69.107 with HTTP; Mon, 22 Oct 2012 12:44:40 -0700 (PDT) In-Reply-To: <5084281C.9020507@sugarcrm.com> References: <712F4499-949C-4C6F-A142-736A1B156189@gmail.com> <5084281C.9020507@sugarcrm.com> Date: Mon, 22 Oct 2012 15:44:40 -0400 Message-ID: To: Stas Malyshev Cc: Nikita , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=f46d04083df79afd8104ccab1542 Subject: Re: [PHP-DEV] Generics proposal From: ircmaxell@gmail.com (Anthony Ferrara) --f46d04083df79afd8104ccab1542 Content-Type: text/plain; charset=ISO-8859-1 Stas, On Sun, Oct 21, 2012 at 12:51 PM, Stas Malyshev wrote: > Hi! > > > Hello, list. I want to propose generics. > > Please no. If you need Java, you know where to find it. Java has a set > of great tools, great books, great community. And it's completely free. > Anybody who needs Java can just do it. I see no need to turn PHP into Java > This is not about turning PHP into Java. Can we get over that old rhetoric already? Instead of bashing proposals like this, can we discuss them, instead of this hatred for all things strict? With that aside, I have mixed feelings on this. On the one hand, I love the functionality. The ability to have meta-type-safety without having to pollute the environment with tons of empty classes with nothing more than a type hint (for all collection types) is huge. It would definitely make defensive programming much easier. Especially if the ability was afforded to arrays as well (function foo(array $array){})... On the other hand, the syntax leaves a lot to be desired. It's quite confusing and really is ugly. As far as how to fix the syntax, I'm not sure. But I would like to voice my support for the concept... --f46d04083df79afd8104ccab1542--