Re: Proposal: shorthand object property setting syntax.

From: Date: Sat, 27 Mar 2010 17:21:31 +0000
Subject: Re: Proposal: shorthand object property setting syntax.
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-47661@lists.php.net to get a copy of this message
2010/3/27 Johannes Schlüter <johannes@php.net>:

>  Syntax-wise it /could/  work like this:
>
> with ($MyLongNameObject) {
>    ->property1 = '1111';
>    ->property2 = '2222';
> }
>
> 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 in many languages. So if we ever introduce
something similar, I'd to choose that one over any other.

-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org


Thread (15 messages)

« previous php.internals (#47661) next »