Re: Proposal: shorthand object property setting syntax.
| From: | Stan Vassilev | Date: | Sun, 28 Mar 2010 10:36:43 +0000 |
| Subject: | Re: Proposal: shorthand object property setting syntax. | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-47667@lists.php.net to get a copy of this message | ||
Hi,
There is another solution to this problem, which is sort-of-on-the-table,
and it's named parameters:
$myLongNameObject = new MyLongNameObject(
'property1' => '11111',
'property2' => '22222',
'property3' => '33333',
'property4' => '44444',
'property5' => '55555',
);
With proper update, code hinting for named parameters could be introduced in
IDEs in order not to end up slower than the current syntax.
It also solves other issues and doesn't suffer from the scope resolution
problems "with() {}" suffers from.
Regards,
Stan Vassilev