Hi!

As I've got some questions on the topic, I'd like to revive and soon put
to vote the parameter skipping RFC: https://wiki.php.net/rfc/skipparams

For those who doesn't remember, quick reminder - it is about an ability
to skip parameters in function calls so they'd take default value, like
this:
function foo($a, $b = true, $c = "abc") { ... }
foo($x, default, $y); // $b gets to be true here

In the last discussion I had a lot of "objections" to the tune of "we'd
rather have named parameters". I like the idea of named parameters too,
but this one does not contradict it - rather, it compliments it, and a
lot of the extensions cleanup done in this patch also serves as a base
for possible implementation of named params, if it happens (more on that
in the RFC itself).

The pull is at: https://github.com/php/php-src/pull/981
The patch has been reworked to work with PHP 7 engine changes, it is not
perfect yet but in workable condition, and at this point I'd like to
have a decision if we want to continue with it before I invest more time
into covering the remaining corners.

Note that the RFC has been changed in some details (e.g. variadics
handling, but there's more) since the last time it was discussed, due to
the changes in phpng, so I recommend re-reading the RFC even if you were
familiar with it before.
-- 
Stas Malyshev
smalys...@gmail.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to