Re: Proposal: shorthand object property setting syntax.
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)