Hello Stas,

>> I do not think that properties should make use of a trait-like syntax,
>> as
>> that is not what a property is about.  A property is basically a layer
>> of
>> syntactic sugar over a pair of methods.  The majority of the time when
>> writing properties, you will not want to re-use them, so I have a hard
>> time seeing many parallels to traits.
>
> A side note: in PHP, property actually has four methods, not two -
> get/set/unset/isset.

That is true for PHP variables.  isset is basically saying "does this
variable exist", and unset is saying to get rid of it.

Because properties (as defined in my RFC) are not a variable, but rather a
set of methods, I do not think there would be any way to "unset" them. 
Like a method, once they are defined, you cannot get rid of them. 
Therefore "overloading" isset and unset would not make any sense here.

- Dennis


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to