Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80201 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73331 invoked from network); 5 Jan 2015 22:03:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2015 22:03:03 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.169 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.169 mail-pd0-f169.google.com Received: from [209.85.192.169] ([209.85.192.169:55493] helo=mail-pd0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/D9-21693-61A0BA45 for ; Mon, 05 Jan 2015 17:03:02 -0500 Received: by mail-pd0-f169.google.com with SMTP id z10so29002569pdj.14 for ; Mon, 05 Jan 2015 14:02:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=XTv9Wx5L03yJBZr+554FvPRX9l9Hc5lZzG/d+0T1qAQ=; b=nDs+o3vPfMKdkIg4rbzPIJFNlLEucQLuISqqcMu43LsdDWjXsU+yhlOw+rOFNhgDc5 G9V7Wi15OpINHABX6eO0WmbV9fiKqouCrjUdac/9hhk3qd3SHG1IvZtwLBvctjr8i1MB woiudoy7CaHtKhIhO+XcHkXBxJ2R3kvF8yi9D84H13W9tRnusqNagayhcRpbYr8RgiKM attu2PWCBwuueEHgmsaBQ9Nw51TJgoWq3MZr/jDjiS97RGaUqOTK4nHX0eNjZr9+Fvjv 6lrIlAhpQxboO5RzWHDAJ0ufvZ1E320JyTTmYwuf1OCQ/K53kcngop8ymA5v9YYMLc2u 9ofA== X-Received: by 10.68.202.98 with SMTP id kh2mr151702735pbc.6.1420495378554; Mon, 05 Jan 2015 14:02:58 -0800 (PST) Received: from stas-air.corp.wikimedia.org (tan4.corp.wikimedia.org. [198.73.209.4]) by mx.google.com with ESMTPSA id uk5sm11019366pbc.17.2015.01.05.14.02.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jan 2015 14:02:58 -0800 (PST) Message-ID: <54AB0A10.4010709@gmail.com> Date: Mon, 05 Jan 2015 14:02:56 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: PHP Internals Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: [RFC] Parameter skipping, take 3 From: smalyshev@gmail.com (Stanislav Malyshev) 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 smalyshev@gmail.com