Re: [PHP-DEV] Proposal: shorthand object property setting syntax.

2010-03-27 Thread Davey Shafik
On Mar 27, 2010, at 3:59 PM, Bharat Nagwani wrote: > I might have missed earlier emails. How about this? > > $myLongNameObject = new myLongNameObject { >property1: '1', >property2: '2', >property3: '3', >property4: '4', >property5: '5', > }; > > Can we av

RE: [PHP-DEV] Proposal: shorthand object property setting syntax.

2010-03-27 Thread Bharat Nagwani
I might have missed earlier emails. How about this? $myLongNameObject = new myLongNameObject { property1: '1', property2: '2', property3: '3', property4: '4', property5: '5', }; Can we avoid the new as well like in Javascript? $myLongNameObject = { pro

Re: [PHP-DEV] Proposal: shorthand object property setting syntax.

2010-03-27 Thread 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' => '1', 'property2' => '2', 'property3' => '3', 'property4' => '4', 'property5' => '5', ); With pr

Re: [PHP-DEV] Proposal: shorthand object property setting syntax.

2010-03-27 Thread Toorion
On 03/27/2010 08:09 PM, Johannes Schlüter wrote: You can always use a (temporary) alias to shorten things $myLongNameObject = new MyLongNameObject(); $t = $myLongNameObject; $t->property1 = '1'; $t->property2 = '2'; $t->property3 = '3'; $t->property4 = '4'; $t->property5 = '5

Re: [PHP-DEV] Proposal: shorthand object property setting syntax.

2010-03-27 Thread Toorion
On 03/27/2010 07:23 PM, Martin Jansen wrote: On 27.03.10 17:02, Toorion wrote: $myLongNameObject = new MyLongNameObject(); $myLongNameObject->property1 = '1'; $myLongNameObject->property2 = '2'; $myLongNameObject->property3 = '3'; $myLongNameObject->property4 = '4'; $myLongNameOb

Re: [PHP-DEV] Proposal: shorthand object property setting syntax.

2010-03-27 Thread Pierre Joye
2010/3/27 Johannes Schlüter : > Syntax-wise it /could/  work like this: > > with ($MyLongNameObject) { >    ->property1 = ''; >    ->property2 = ''; > } > > but there's no big benefit over an alias but way more confusion with a > new syntax, a new keyword, ... This syntax is well known i

Re: [PHP-DEV] Proposal: shorthand object property setting syntax.

2010-03-27 Thread Johannes Schlüter
On Sat, 2010-03-27 at 19:02 +0300, Toorion wrote: > Very often (for example when work with dom or UI object) setting plenty > of object properties is require. At this time we has not a lot options. > Standard way looks very dirty and be reason of more copy-paste-work. > > Reproduce code: > --

Re: [PHP-DEV] Proposal: shorthand object property setting syntax.

2010-03-27 Thread Stefan Marr
>> However, the proposal reminds me of Pascal's 'with'-construct: >> >> new(pointertob); >> >> with pointertob^ do >> begin >> a := 10; >> b := 'A'; >> c := nil >> end; > > Can one do something like "b := this.a"? This sounds like a huge can of > worms to me. Ehm, I don't see what might be p

Re: [PHP-DEV] Proposal: shorthand object property setting syntax.

2010-03-27 Thread Martin Jansen
On 27.03.10 17:29, Stefan Marr wrote: > > On 27 Mar 2010, at 17:23, Martin Jansen wrote: > >> On 27.03.10 17:02, Toorion wrote: >>> $myLongNameObject = new MyLongNameObject(); >>> $myLongNameObject->property1 = '1'; >>> $myLongNameObject->property2 = '2'; >>> $myLongNameObject->property3

Re: [PHP-DEV] Proposal: shorthand object property setting syntax.

2010-03-27 Thread Stefan Marr
On 27 Mar 2010, at 17:23, Martin Jansen wrote: > On 27.03.10 17:02, Toorion wrote: >> $myLongNameObject = new MyLongNameObject(); >> $myLongNameObject->property1 = '1'; >> $myLongNameObject->property2 = '2'; >> $myLongNameObject->property3 = '3'; >> $myLongNameObject->property4 = '444

Re: [PHP-DEV] Proposal: shorthand object property setting syntax.

2010-03-27 Thread Martin Jansen
On 27.03.10 17:02, Toorion wrote: > $myLongNameObject = new MyLongNameObject(); > $myLongNameObject->property1 = '1'; > $myLongNameObject->property2 = '2'; > $myLongNameObject->property3 = '3'; > $myLongNameObject->property4 = '4'; > $myLongNameObject->property5 = '5'; [...] >

[PHP-DEV] Proposal: shorthand object property setting syntax.

2010-03-27 Thread Toorion
Very often (for example when work with dom or UI object) setting plenty of object properties is require. At this time we has not a lot options. Standard way looks very dirty and be reason of more copy-paste-work. Reproduce code: --- $myLongNameObject = new MyLongNameObject(); $myLong

Re: [PHP-DEV] trunk is alive and open

2010-03-27 Thread Florian Anderiasch
On 27.03.2010 13:13, Ferenc Kovacs wrote: > I like the way how the debian guys elect the project leader: > http://en.wikipedia.org/wiki/Debian#Project_organization > http://en.wikipedia.org/wiki/File:Debian-organigram.png > http://en.wikipedia.org/wiki/Schulze_method Hi, while I do agree that they

Re: [PHP-DEV] trunk is alive and open

2010-03-27 Thread Ferenc Kovacs
On Sat, Mar 27, 2010 at 11:12 AM, Lukas Kahwe Smith wrote: > > On 25.03.2010, at 22:58, Christopher Jones wrote: > > > After considering what is needed by PHP, I believe the vote should > > primarily be thought of as a choice between Derick and David. If > > either wants to bring in a co-RM to sh

Re: [PHP-DEV] How to trace a crash bug?

2010-03-27 Thread Ferenc Kovacs
On Sat, Mar 27, 2010 at 11:00 AM, Alexey Zakhlestin wrote: > > On 27.03.2010, at 9:05, Thomas Hruska wrote: > > > One thought: Has a way to track call depth been considered (perhaps > _execute())? If the number of calls exceeds a certain (reasonable) number, > a warning or notice could be displa

Re: [PHP-DEV] trunk is alive and open

2010-03-27 Thread Lukas Kahwe Smith
On 25.03.2010, at 22:58, Christopher Jones wrote: > After considering what is needed by PHP, I believe the vote should > primarily be thought of as a choice between Derick and David. If > either wants to bring in a co-RM to share the load, then I suggest > Lukas be first choice. > > I'd be happ

Re: [PHP-DEV] How to trace a crash bug?

2010-03-27 Thread Alexey Zakhlestin
On 27.03.2010, at 9:05, Thomas Hruska wrote: > One thought: Has a way to track call depth been considered (perhaps > _execute())? If the number of calls exceeds a certain (reasonable) number, a > warning or notice could be displayed and the output buffer flushed. That > way, when it crashes