Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71363 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52938 invoked from network); 20 Jan 2014 22:00:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2014 22:00:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.216.194 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.216.194 mail-qc0-f194.google.com Received: from [209.85.216.194] ([209.85.216.194:37352] helo=mail-qc0-f194.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/ED-02192-98C9DD25 for ; Mon, 20 Jan 2014 17:00:42 -0500 Received: by mail-qc0-f194.google.com with SMTP id e16so1913240qcx.9 for ; Mon, 20 Jan 2014 14:00:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=p4ZiGiCmOjlMJoinG7Rc277EJDDdkXnEKJ2mB+9kRCk=; b=ocwVYzOBgmmNDzwXIyy96Cs58qAzWB0qfUBfbIshgd5D8TxBGSwZ42Zcxp6nbsJ1VC 8XkPtC3Tn7fDG+w4EXuBWZaGBc7HoKStF4KO0U8muenNqTiKg2bb03gNN+lIxpF84FhC uh9ZLq8s0wn6I9cZwN2TrEy6eoxfiHWujvrjI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=p4ZiGiCmOjlMJoinG7Rc277EJDDdkXnEKJ2mB+9kRCk=; b=YdUNak7DDneL8vBoLqfmJeJjs6Y3pVt8QQ56QdeT+bBcKaWLmEVof6LyPWktwQa/jV jLSoeZ7RMz+Fw1OJVqUW56Lqvuq2i52I1qxkdV+mNfSTixuzlPYVvr/UnpJWTG3Qq10A 7BoS7A11PTC0FEKaKR+QKfMcm+EP69nZiUOkGU1t9V+7LQKw5ji726xuWu6Y8VwjjVZ4 FEAaYMKsmOcfwRmfBAfyGdT4mVdXkyQQnibQUPhgrlS6WWIwcK+Rv/kfVqrbdDCqOmhH oJlr4xqMSXc0YCycosa4vd+d3Qz+2MLRsybmFVT1mH7pd8aUWOX95uRvziZQa3L7q1+6 a6ZA== X-Gm-Message-State: ALoCoQlzGF/oF+PwxwL0JHe2sWWesyUu+DxAxK+vvuGeYDdo82NLBiamZy+r/aWNdaoujlDUb3uJ MIME-Version: 1.0 X-Received: by 10.140.89.52 with SMTP id u49mr30174508qgd.93.1390255239340; Mon, 20 Jan 2014 14:00:39 -0800 (PST) Received: by 10.96.182.98 with HTTP; Mon, 20 Jan 2014 14:00:39 -0800 (PST) In-Reply-To: References: <52D865C7.4070009@sugarcrm.com> Date: Tue, 21 Jan 2014 00:00:39 +0200 Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c1236ab04d8d04f06e05e9 Subject: Re: [PHP-DEV] Introducing "Array Of" RFC From: narf@devilix.net (Andrey Andreev) --001a11c1236ab04d8d04f06e05e9 Content-Type: text/plain; charset=UTF-8 Please excuse my lack of knowledge, but if I understand this correctly, this is how generics would work ... using arrays, ignore the syntax and details such as child classes, interfaces, etc.: $fruits = Array; - declare that $fruits is an array that can only contain instances of class Fruit function eat(Array $apples) - function eat() will only accept arrays that are declared in the same way as $fruits above If that is so, then I deffinately see how this RFC is similar to generics and how generics would give us higher performance. But I also see how it is different and how it serves for another (yet indeed similar) purpose. I wouldn't rule out either feature, but if that is what you people want, why don't you vote on: a) array of; b) generics; c) both and be done with it. I surely do understand why Phil Sturgeon got so heated about the discussion going nowhere - at least 3 separate topics are being discussed here and everybody has an opinion on all of them separately. This isn't productive. --001a11c1236ab04d8d04f06e05e9--