Re: [RFC] Bare Name Array

From: Date: Sun, 01 Jun 2014 20:24:20 +0000
Subject: Re: [RFC] Bare Name Array
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-74687@lists.php.net to get a copy of this message
On 01/06/2014 20:46, Andrea Faulds wrote:
I don’t think readability would be hurt. [ key: value ] is as easy to understand as [ “key” => value ], and likely very familiar to people who have dealt with JavaScript or JSON.
Actually, JSON requires all keys to be quoted (because Crockford didn't want to import the list of reserved words from JavaScript, and wanted JSON to be a strict subset of JS syntax). Also, even in JS itself, both [ key: value ] is a syntax error, since it would be { key: value } instead. So this would be a novel syntax, even if it "remixes" ideas from other languages. -- Rowan Collins [IMSoP]

« previous php.internals (#74687) next »