Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71199 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66333 invoked from network); 16 Jan 2014 23:05:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jan 2014 23:05:49 -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.115 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.115 smtp115.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.115] ([108.166.43.115:58462] helo=smtp115.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A5/77-21406-CC568D25 for ; Thu, 16 Jan 2014 18:05:49 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp7.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id BB3C51B859F; Thu, 16 Jan 2014 18:05:45 -0500 (EST) X-Virus-Scanned: OK Received: by smtp7.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 292FC1B855A; Thu, 16 Jan 2014 18:05:43 -0500 (EST) Message-ID: <52D865C7.4070009@sugarcrm.com> Date: Thu, 16 Jan 2014 15:05:43 -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: Andrey Andreev , "internals@lists.php.net" References: 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! > It's easily readable and everybody should be able to recognize what this > thing does even without prior knowledge. > > Hell, why not Array[Foo|Bar|stdClass|whocares] ? > > Or even (at a later stage): > > Array[]["key1", "key2"] I don't think inventing another language to specify types inside PHP is a good idea. If somebody is really into type calculus, there are many academic languages to play with. In practice, such byzantine constructs rarely make developer's work easier on tasks that PHP is commonly applied to. If you want a language that can run code to check if your array conforms to arbitrary set of rules, what's wrong with PHP language? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227