Hey,

> Problem with checking array on assignment is that it could be N dimensions
> deep and one would have perform check for each item in each dimension for
> mutable values which could have some performance implications.

if you want to enforce that in userland now, you have even higher
performance implications. I wouldn't worry about the performance of
edge cases and take away a feature for everybody else because of that.

If there's a better internal implementation, it can always be improved later.

> Regarding constructor call, upon first initialization of object, you are
> allowed to assign values to properties, after constructor is executed,
> object is locked. If you try to call again constructor on the same object it
> would fail as soon as execution reaches first assignment statement because
> object was already marked as locked.

Sounds good! So it's already implemented basically.

> I agree that it would be better to pass by value but I am not sure how would
> that impact the way we currently manage objects in object store.

If we both agree it would be the better way, why not draft an RFC for
it and find someone who knows how to implement it?

Regards, Niklas

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

Reply via email to