Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71360 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48748 invoked from network); 20 Jan 2014 21:37:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2014 21:37:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.220.41 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.220.41 mail-pa0-f41.google.com Received: from [209.85.220.41] ([209.85.220.41:35752] helo=mail-pa0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C7/1D-02192-B079DD25 for ; Mon, 20 Jan 2014 16:37:15 -0500 Received: by mail-pa0-f41.google.com with SMTP id fa1so5207064pad.28 for ; Mon, 20 Jan 2014 13:37:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=o+CYm2GtrvRqCcE4KCUhxNK6SF8T047RJlko/DfLQrU=; b=Q/XPcE3ek2h0j7KULS7lM1wDjiVf856Avcg+iBly0m0mZnNmVdNhxPH6wwTxTvRKMK kRWp+g7i/0B+xZuqcLkYjetk5jk0Zo3iLR62rVbHkPEs3izgJfqC3cdFSdRftzYKV+HK EhIbbt/x3QwicQK0ICQykm8h+fJRbB6DnS5Qwj7GJ22W5An8X4If3xhHhvyciT3AxaGR PWLkiERyCyRk+ZoPFzx9TTNpccwdel7lTQcqvgU2vddJI+kbaj6JThGwFwnY8Mp9QQIT Jk5bj3jloUHGa8XM2lfqDFHIEe1a1wApKhs1maOya9ApyT8v03La2VfCLY43hZuPYuz+ nVng== X-Gm-Message-State: ALoCoQnuBIclc1Fj4HhbrhC0BcFi54isxAu2BZvD0eiTfbTd51hVsUcAsX9MCQhPwrOaknspUV+t MIME-Version: 1.0 X-Received: by 10.66.27.201 with SMTP id v9mr5551831pag.136.1390253832316; Mon, 20 Jan 2014 13:37:12 -0800 (PST) Sender: php@golemon.com Received: by 10.70.77.164 with HTTP; Mon, 20 Jan 2014 13:37:12 -0800 (PST) X-Originating-IP: [2001:470:1f09:2fa:22c9:d0ff:fe87:295b] In-Reply-To: <52DD94AE.6030705@sugarcrm.com> References: <52DCA3E7.80602@lerdorf.com> <52DCED71.3020207@pthreads.org> <006301cf15f5$22f8df60$68ea9e20$@tutteli.ch> <52DD77E8.8000800@ajf.me> <52DD8E98.3010606@sugarcrm.com> <52DD94AE.6030705@sugarcrm.com> Date: Mon, 20 Jan 2014 13:37:12 -0800 X-Google-Sender-Auth: WYGcMM1kBv_ma4W8HcHCxntoAvk Message-ID: To: Stas Malyshev Cc: "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Introducing "Array Of" RFC From: pollita@php.net (Sara Golemon) >> To quote someone who's skill and abilities I respect: "Just because >> they do it some way in X, doesn't mean it belongs in PHP." > > That is true. But this is not "just because" - I'm not arguing about any > specific syntax or even semantics. I'm talking about all of them not > even going in that general direction and still being fine. That makes me > question if the need for generics is that great and if they actually are > a good fit for a dynamic language, at least in a way that they are > presented - i.e. as type checking mechanism, not as code generation > mechanism. I could repeat the regular arguments why I think they are not > if you'd like - I did it on this list like 100 times and everybody is > tired and hating me for that already, but I could do it again on popular > request. So it's not the only argument. It is an additional argument > providing some perspective. > This is an issue that keeps coming up. Calling for typed arrays to look like generics is not the same as calling for generics. It's an acknowledgement that there is a fundamental shared behavior between the two. A generic implementing ArrayAccess and Traversable is not different **FROM A USERSPACE POINT OF VIEW** from a typed array (apart from object psuedoreference semantics and the ability to check on input). Given that they look the same **FROM A USERSPACE POINT OF VIEW**, they should share common syntax. This does not mean that we have to add (or even agree to add) generics in order to adopt typed arrays. This does not mean the implementation of typed arrays need share anything in common with generics should they be someday be voted in. This is just thinking of the consistency of the language. This is about how the user interacts with the syntax. -Sara