Re: Introducing "Array Of" RFC

From: Date: Mon, 20 Jan 2014 21:07:04 +0000
Subject: Re: Introducing "Array Of" RFC
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  Groups: php.internals 
Request: Send a blank email to internals+get-71354@lists.php.net to get a copy of this message
On 20/01/14 21:01, Stas Malyshev wrote:
Hi!
Dictionary<int, string>[] foo <-- Is that *really* what you want an array of int->string dictionaries to look like? Really?
In every (popular) dynamic language on a planet (Perl, Python, Ruby, Javascript, Lua, Groovy) it looks roughly like that (within syntax variations): foo = [Dictionary()] I wonder why it is enough for them? Are they all missing something very important?
You might note that what you've just provided an example of is not, in fact, a type specifier. It is a literal. For a similar reductio ad absurdiam, I might as well give an example from C - a struct literal: foo = {7, 5, create_list(), {"this is a string"}} It serves no usefulness to the conversation here. This is about type specifiers, not literals. -- Andrea Faulds http://ajf.me/

« previous php.internals (#71354) next »