Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47664 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69037 invoked from network); 27 Mar 2010 19:38:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Mar 2010 19:38:16 -0000 Authentication-Results: pb1.pair.com header.from=sv_forums@fmethod.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sv_forums@fmethod.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fmethod.com from 209.85.218.168 cause and error) X-PHP-List-Original-Sender: sv_forums@fmethod.com X-Host-Fingerprint: 209.85.218.168 mail-bw0-f168.google.com Received: from [209.85.218.168] ([209.85.218.168:34768] helo=mail-bw0-f168.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/69-22155-7AE5EAB4 for ; Sat, 27 Mar 2010 14:38:16 -0500 Received: by bwz8 with SMTP id 8so679578bwz.3 for ; Sat, 27 Mar 2010 12:38:12 -0700 (PDT) Received: by 10.204.156.211 with SMTP id y19mr2128830bkw.57.1269718692648; Sat, 27 Mar 2010 12:38:12 -0700 (PDT) Received: from pc ([83.228.56.37]) by mx.google.com with ESMTPS id 24sm20500143bkr.0.2010.03.27.12.38.11 (version=SSLv3 cipher=RC4-MD5); Sat, 27 Mar 2010 12:38:12 -0700 (PDT) Message-ID: <5EC8C94EFD714783A042A71FD52B6A46@pc> To: , "Toorion" References: <1269709768.7944.17.camel@guybrush> <28.76.22155.18B4EAB4@pb1.pair.com> Date: Sat, 27 Mar 2010 21:38:08 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Subject: Re: [PHP-DEV] Proposal: shorthand object property setting syntax. From: sv_forums@fmethod.com ("Stan Vassilev") 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