On Mon, Sep 2, 2013 at 9:17 AM, Stas Malyshev <smalys...@sugarcrm.com>wrote:
> Hi! > > I've finally took some time to revive the skipping parameter RFC and > patch. For those who doesn't remember what it is please see: > https://wiki.php.net/rfc/skipparams > TLDR version: > > The idea is to allow skipping parameters in function with optional > arguments so that this: > function create_query($where, $order_by, $join_type='INNER', $execute > = false, $report_errors = true) > > can be called like this: > create_query("deleted=0", "name", default, default, > /*report_errors*/ true); > > Instead of trying to remember what the defaults are. > The patch is here: > > https://github.com/php/php-src/pull/426 > > Any comments or feedback on the RFCs and the code are welcome, > especially pointing out the cases where it may not work (which means we > need more phpt's there :) > I'm -1 on this proposal. I think this doesn't really help readability. Right now you should implement functions with many options with an $options array. If we want to change something here, we should skip this step and go right for named arguments. I think I'll give implementing them a try. Nikita