Re: PHP6 new syntax use suggestion
| From: | Lars Strojny | Date: | Fri, 23 May 2008 15:06:53 +0000 |
| Subject: | Re: PHP6 new syntax use suggestion | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37830@lists.php.net to get a copy of this message | ||
Hi Marco,
Am Freitag, den 23.05.2008, 16:51 +0200 schrieb Marco:
> I can't see any real benefit of this change apart from a WTF factor...
> its possible i'm missing something though! Whats the benefit apart
> from saving a line of code?
The fact that this syntactic variant is available *and used* in a lot of
other popular languages (JavaScript, Ruby, Python) might be an
indicator, that it is helpful. The use-case has been illustrated before
and is still valid, except that for the specific function there was a
better alternative. The use-case is, in short: "a function/method which
reliably returns an array with fixed keys and you want to use a single
key".
cu, Lars
Attachment: [application/pgp-signature] Dies ist ein digital signierter Nachrichtenteil signature.asc
Attachment: [application/pgp-signature] Dies ist ein digital signierter Nachrichtenteil signature.asc