Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71349 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31626 invoked from network); 20 Jan 2014 20:54:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2014 20:54:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.67 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.67 smtp67.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.67] ([108.166.43.67:48953] helo=smtp67.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3A/59-02192-91D8DD25 for ; Mon, 20 Jan 2014 15:54:49 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 38911148156; Mon, 20 Jan 2014 15:54:47 -0500 (EST) X-Virus-Scanned: OK Received: by smtp1.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 6394614818D; Mon, 20 Jan 2014 15:54:46 -0500 (EST) Message-ID: <52DD8D15.7000407@sugarcrm.com> Date: Mon, 20 Jan 2014 12:54:45 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Sara Golemon , Philip Sturgeon CC: Philip Sturgeon , Robert Stoll , Joe Watkins , "internals@lists.php.net" References: <0B.B1.24763.139B7D25@pb1.pair.com> <002001cf12da$2bfbda90$83f38fb0$@tutteli.ch> <52DCA3E7.80602@lerdorf.com> <52DCED71.3020207@pthreads.org> <006301cf15f5$22f8df60$68ea9e20$@tutteli.ch> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Introducing "Array Of" RFC From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > ArrayOf: "I would like hammers in a bag." > Generics: "I would like a bag of hammers." Generics are more like "I would like a 100lb to 120lb bag of hammers with handles made of wood grown in equatorial Africa between 1980 and 1985, not cut down during national holidays in Brazil and provided all workers were paid the fair wage, while the heads must be made of steel approved by German Council of Steel Manufacturers, and the assembly must have been performed in a country that signed the convention about the ethical treatment of animals". You'd want arrays of arrays of foo, and arrays that have keys of foo and values be arrays of tuples of bar and baz, etc. etc. I can definitely see a contract that would require hammers exactly like that, or even with more precise list of conditions, but do we want this in the PHP language itself (as opposed to delegating it to the user/library code)? I personally don't really want it as a part of the language. I think keeping language small(ish) and simple has its value. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227