> On 14 Apr 2016, at 00:36 , Stanislav Malyshev <smalys...@gmail.com> wrote:
> 
> With getters/setters, the answer is clear - yes, you can extend it with
> setters, but if your invariant relies on immutability, you'd be
> violating LSP. With properties, not clear.


So in summary preference would be that something like Property Accessors 
Syntax* is re opened and updated?

>From user land main motivation to support this and typed properties is to be 
>allowed to type hint and make properties readonly to simplify use cases for 
>entities and value objects, using properties, and not having to resort to 
>magic methods which tends to become slow(er) and messy. For how this is 
>archived, not violating LSP, and making sure the language and internals are 
>kept as consistent as possible would be high up there as reasoning to pick 
>approach



* https://wiki.php.net/rfc/propertygetsetsyntax-v1.2


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

Reply via email to