Re: __constructor parameter limitations.
| From: | Stas Malyshev | Date: | Tue, 20 Sep 2011 17:45:17 +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-55561@lists.php.net to get a copy of this message | ||
Hi!
On 9/19/11 2:50 AM, Gustavo Lopes wrote:
* It had to be case that the parameters you want to ignore are the lastOf course, but that's a very common scenario - important parameters go first, unimportant go last. Or, if I wanted, I could just have blank signature foo() and figure it out in the function. There are many ways to do this, and I see no reason why we must prohibit some of them - it only makes the life of the developers harder.
* 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).Yes, I could - but why would I want do that? Do you see the situation here: we introduce a check that is supposed to *help* me, and now you say I have to *work around* it to actually do what I want to do? Doesn't it sound like contrary to the purpose of helping me? I want the language to assist me in doing what I want to do, not having to wrestle with it by shutting off warnings and introducing useless parameters. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227