Re: [RFC][VOTE] Trailing commas in all list syntax

From: Date: Tue, 31 Jan 2017 21:52:57 +0000
Subject: Re: [RFC][VOTE] Trailing commas in all list syntax
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-98097@lists.php.net to get a copy of this message
Am 30.01.2017 um 04:17 schrieb Yasuo Ohgaki <yohgaki@ohgaki.net>: > Unless there is critical reason not to implement it that I don't know of, I > prefer to allow trailing commas like array universally/consistently. I agree that consistency would be preferable here. Syntax subtleties where sometimes you can have trailing commas and sometimes you can't are more confusing than helpful IMHO. One point where I'm most missing it is function calls because we use some very powerful variadic functions in our core library which can lead to long parameter lists (without being bad design) and therefore profit the most from not having a special case on the last line. And I really don't expect a proliferation of uglier code by allowing trailing commas while there are cases where it is very useful. Regards, - Chris

« previous php.internals (#98097) next »