Re: RFC Skipping optional parameters for functions

From: Date: Sun, 27 May 2012 18:03:28 +0000
Subject: Re: RFC Skipping optional parameters for functions
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-60679@lists.php.net to get a copy of this message
NOTE: Although related/solving some of the same problems; skipping optional parameters (several commas or using 'default' keyword) is different from using named parameters. And both have different supporters/haters over each change. I wouldn't like to restart the whole debate over the KISS, "Not the PHP way", or the alternate ways work around the original issue. But on a personal opinion, I'd like to see named parameters implemented - which also solves the skipping optionals regardless of the order - the only concern of the community at large might be the proper syntax.. I also suggested the even shorter array syntax for 5.4: http://php.net/migration54.new-features Which would use the colon as a separator $a = ['one': 1, 'two': 2, 'three': 3, 'four': 4]; And the idea it would be simpler/efficient/readable inspired some dissent over both the readability and the PHP-way. So I'm not sure if your suggestion won't keep the same issue...

« previous php.internals (#60679) next »