Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
rfc:variadics [2013/09/16 20:26] – nikic | rfc:variadics [2013/09/24 10:37] – nikic |
---|
* Date: 2013-08-27 | * Date: 2013-08-27 |
* Author: Nikita Popov <nikic@php.net> | * Author: Nikita Popov <nikic@php.net> |
* Status: Voting | * Status: Accepted |
* Proposed for: PHP 5.6 | * Proposed for: PHP 5.6 |
* Patch: https://github.com/php/php-src/pull/421 | * Patch: https://github.com/php/php-src/pull/421 |
* ''params $args''. This is what C# does. This would require making ''params'' a keyword. Furthermore this doesn't have any nice way to declare typehints. In C# this is done using ''params type[] args'', but PHP doesn't have ''type[]'' hints and introducing them only here doesn't seem right. | * ''params $args''. This is what C# does. This would require making ''params'' a keyword. Furthermore this doesn't have any nice way to declare typehints. In C# this is done using ''params type[] args'', but PHP doesn't have ''type[]'' hints and introducing them only here doesn't seem right. |
| |
The proposed syntax is also used by Java and will be used in [[http://wiki.ecmascript.org/doku.php?id=harmony:rest_parameters|Javascript (ECMAScript Harmony proposal)]]. | The proposed syntax is also used by Java and will be used in [[http://wiki.ecmascript.org/doku.php?id=harmony:rest_parameters|Javascript (ECMAScript Harmony proposal)]]. Go and C++ also employ a similar syntax. |
| |
===== Patch ===== | ===== Patch ===== |
===== Vote ===== | ===== Vote ===== |
| |
The vote started on 16.09.2013. As this is a language change a two-third majority is required. | The vote started on 16.09.2013 and ended on 23.09.2013. There were 36 votes in favor and one against, as such the necessary two-third majority is met and this feature is **accepted**. |
| |
<doodle title="Should the proposed variadic-function syntax be added in PHP 5.6 (master)?" auth="nikic" voteType="single" closed="false"> | <doodle title="Should the proposed variadic-function syntax be added in PHP 5.6 (master)?" auth="nikic" voteType="single" closed="true"> |
* Yes | * Yes |
* No | * No |