Re: [PHP-DEV] Signature compatibility: Number of arguments

2013-09-18 Thread Julien Pauli
On Thu, Aug 29, 2013 at 11:33 AM, Nikita Popov nikita@gmail.com wrote: Hi internals! This is a spinoff from the variadics thread. Quoting Stas: I also think this: public function query($query, ...$params) public function query(...$params) should be legal too. This is a

[PHP-DEV] Signature compatibility: Number of arguments

2013-08-29 Thread Nikita Popov
Hi internals! This is a spinoff from the variadics thread. Quoting Stas: I also think this: public function query($query, ...$params) public function query(...$params) should be legal too. This is a general issue in PHP that we might want to fix: Currently a method A is not

Re: [PHP-DEV] Signature compatibility: Number of arguments

2013-08-29 Thread Patrick ALLAERT
2013/8/29 Nikita Popov nikita@gmail.com: Hi internals! This is a spinoff from the variadics thread. Quoting Stas: I also think this: public function query($query, ...$params) public function query(...$params) should be legal too. I respectfully disagree. The first method

Re: [PHP-DEV] Signature compatibility: Number of arguments

2013-08-29 Thread Stas Malyshev
Hi! I respectfully disagree. The first method requires at least one parameter (or two, depending on the pending clarification in the other thread) , and the latest: zero or more (or 1 or more). Yes, this is true. But how it is an objection? LSP allows to weaken preconditions, but not to