Re: [RFC][DISCUSSION] Trailing commas in all list syntax
| From: | Peter Petermann | Date: | Thu, 05 Nov 2015 13:09:46 +0000 |
| Subject: | Re: [RFC][DISCUSSION] Trailing commas in all list syntax | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-89075@lists.php.net to get a copy of this message | ||
Hi Sammy,
> https://wiki.php.net/rfc/list-syntax-trailing-commas
my thoughts on this:
1) having list separators (commas) signals "there is one more item" (thats
the semantic meaning of a comma in a list, right?)
2) you are right, arrays vs. other lists behave inconsistent
however, if i take those two assumptions into account the solution i get to
is not to allow the confusing (and IMHO bad style) of commas at the end
everywhere,
it is to be more strict about it and disallow it for arrays - which would
also be consistent and make more sense (to me), which in return means a
more clean and intuitive language.
However, that would be a BC breaking change, so not for a 7.1. So my
suggestion would be to put this to sleep, live with what we have, and
improve (by removing this from arrays) with the next major.
best regards,
PP
--
Peter Petermann
ProtonMail: ppetermann@protonmail.com (encrypted / based in .ch)
Email: ppetermann80@gmail.com - get my public PGP key from SKS Keyservers
PGP Key:
http://pool.sks-keyservers.net:11371/pks/lookup?op=get&search=0x0E6DBD675836A5C7