Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68977 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95678 invoked from network); 9 Sep 2013 19:40:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Sep 2013 19:40:04 -0000 Authentication-Results: pb1.pair.com header.from=admacedo@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=admacedo@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.181 as permitted sender) X-PHP-List-Original-Sender: admacedo@gmail.com X-Host-Fingerprint: 209.85.223.181 mail-ie0-f181.google.com Received: from [209.85.223.181] ([209.85.223.181:34647] helo=mail-ie0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 90/AC-03199-3142E225 for ; Mon, 09 Sep 2013 15:40:03 -0400 Received: by mail-ie0-f181.google.com with SMTP id y16so8578890ieg.40 for ; Mon, 09 Sep 2013 12:40:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=AS51EwbP2oJBoIg6IlBy4B2H79P67+o13hIEMvF4cGk=; b=qYS4ZWJXu2NKne3z0uuRW1XKyI4/UncWGaJXKjBqiJzc70ar/66laKeTqxJ/3U0YlQ 1M8R4yiVDNSVdDRCyDXFzTk0E2P6bs7lAJaaSt8IYYQz1LCkCW+CyMVMHDymh9j+HHKS ATwIqXZjTJXZL7emF3SQ135D1bCSCuoxDVsIITE3ma7Yw2UVCJkl2uXLnR8YyqdopYRf 3lWUGcnmE80zdmTDolwRAMKZCknpRwfMKapxBsh2M2GusAj4NkzoAWZP7Q1bzticBya0 UNnYPNBUbrv9sI2VgZ4EKFJrMWtivl9xLWUm3UaUtyAk6h85h17im85YHUE3UWrKxL2G WXqQ== X-Received: by 10.43.78.196 with SMTP id zn4mr1640380icb.55.1378755600768; Mon, 09 Sep 2013 12:40:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.240.77 with HTTP; Mon, 9 Sep 2013 12:39:19 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 Sep 2013 20:39:19 +0100 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Re: [RFC] Named parameters From: admacedo@gmail.com (Daniel Macedo) Nikita, I agree with your views, although, I think your last suggestion comes close to being close to some sort of weird method overloading (the way I understood it). I'd expect B::foo() to throw a warning/error and maybe stop there, and you're considering reaching to the parent method to see if that signature matches the function call... While method overloading would be interesting to have (see previous discussions on the matter ;)) this is a sort of weird and unexpected reaching-back behaviour... I'm not sure this seems like a logical approach, I say stick with the error and expect a consistent usage of the (rewritten) API and prevent obscure bugs where you change an implementation and rewrite param names when in fact you should stay consistent with the existing code if you're extending existing behaviour! In fact I'm not sure if the other way around should be the norm; where we'd force the dev to implement the *same* args as the parent (like it is now: i.e. type hinting, same signature, etc); even if it's just to do an unset($oldbar) inside something like B::foo($newBar, $oldBar = NULL) Was that clear? Thanks, Daniel Macedo