[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-internals
Subject:    [PHP-DEV] Re: [lists.php] Re: [PHP-DEV] property de-referencing
From:       Rasmus Schultz <rasmus () mindplay ! dk>
Date:       2013-04-30 20:58:21
Message-ID: CADqTB_iC2OiV4ZOA0+kX3w_6RcCWF7Py-pwxxmZty=0-Jmsx7Q () mail ! gmail ! com
[Download RAW message or body]


I don't think that's necessary - the point of being able to do this, is to
apply meta-programming techniques, so in most situations, what matters is
the ability to quickly create object/property-references... using them will
usually happen inside some service component, e.g. a form-helper or
object/relational-mapper. Having a short syntax for that is much less
relevant - what matters if easy (and of course static) creation of
references to those objects/properties.

On Tue, Apr 30, 2013 at 4:36 PM, ALeX <lists.php@tx0.eu> wrote:

> Just an idea: why not also use ^ (or another operator) to access the
> value? (maybe as an additional way to get/setValue)
>
> $foo = ^$user->name;
>
> echo 'Hello '.^$foo;
> ^$foo = 'Bob';
>
> (using the same operator will conflict when you are accessing a
> property of an object which is a PropertyReference)
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic