Re: __constructor parameter limitations.
| From: | Gustavo Lopes | Date: | Mon, 19 Sep 2011 09:50:02 +0000 |
| Subject: | Re: __constructor parameter limitations. | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-55533@lists.php.net to get a copy of this message | ||
Em Mon, 19 Sep 2011 10:18:50 +0100, Stas Malyshev <smalyshev@sugarcrm.com>
escreveu:
On 9/19/11 2:12 AM, Gustavo Lopes wrote:In the cases where you do want to ignore arguments (say overgenerous interfaces that give you more information than you need to make a decision), relaxing the parameter checks would not be very helpful: * It had to be case that the parameters you want to ignore are the last * You could just put the arguments in the signature and still ignore them (perhaps also giving them a dummy default value so that they don't have to be passed). So there's little to be gained here. -- Gustavo LopesArbitrary as it may be, it's nevertheless reasonably arbitrated given how little useful it is to just ignore arguments and how likely it is to a mistake.It is not little useful and it is not likely to make such mistake without immediately being notified and corrected.