On 09/10/2016 05:55 AM, Fleshgrinder wrote:
So? Where are we now? CoW is definitely doable and I personally think
that it's the best approach because the engine has full control that
nothing goes south. I also do not think that it's magic in any way since
developers have to add the _immutable_ keyword explicitly to the class.
That this modifier modifies the behavior should be obvious, _abstract_
and _interface_ also do that.

Since I mention _interface_. I've been thinking about it and I would
prefer it if the _immutable_ modifier also works for interfaces.
Interfaces are pure abstract classes after all and they are meant to
define a contract for implementors. I cannot see any good reason why it
should not be allowed to force implementors of an interface to be
immutable; same as with abstract classes.

Another aspect that we should discuss is how immutable properties should
behave in case we decide for CoW.

@Larry what do you think about the CoW proposal?

I'm afraid I got lost in the thread somewhere with the back and forth about implementation details. Can you repost the current proposal, or has the RFC page been updated with the latest CoW-based recommendation?

--Larry Garfield

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

Reply via email to