However nobody ever posted anything on internals about it. The
differences between the implementation and the RFC as well as the
questions raised by this addition show that it would be better to
discuss prior to commit.

But as it is in trunk, that's less a problem, that's why trunk exists:
a development tree.

I would still like to see some kind of discussions about it. I would
prefer a simple __toJson for example (yes, that's magic) :).

Apologies for not posting first. My thinking was: Minor change and only in trunk, there'll be a complaint if it's an issue.

On interface naming, my first intention was JSON\Serializable, but since NOTHING else in core is namespaced (and it makes scripting support for pre-5.3 versions complicated), I went with non-namespaced which devolved into an underscore. I prefer JSONSerializable to Jsonizable, personally, but am not over-concerned by what direction is taken.

On method naming, I was following the pattern of __*() for "always on" magic methods (__get(), __set(), etc...) versus interface-induced magic methods (offsetGet(), offsetSet(), etc...).

-Sara

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

Reply via email to