Re: __constructor parameter limitations.
| From: | Etienne Kneuss | Date: | Mon, 19 Sep 2011 10:35:11 +0000 |
| Subject: | Re: __constructor parameter limitations. | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-55545@lists.php.net to get a copy of this message | ||
On Mon, Sep 19, 2011 at 11:50, Gustavo Lopes <glopes@nebm.ist.utl.pt> wrote:
> 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:
>>
>>> Arbitrary 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.
>>
>
> 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.
>
There is surely little to be gained here, but that's not really the point.
The point is that we are currently diverging from the theory, so we should
have a BIG gain of doing so, not the opposite.
>
> --
> Gustavo Lopes
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Etienne Kneuss
http://www.colder.ch