Re: Introducing "Array Of" RFC

From: Date: Thu, 16 Jan 2014 23:05:43 +0000
Subject: Re: Introducing "Array Of" RFC
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-71199@lists.php.net to get a copy of this message
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

« previous php.internals (#71199) next »