Re: [Draft RFC] Object Casting and Assignment Handlers
On Tue, February 28, 2012 8:40 pm, Anthony Ferrara wrote:
> https://wiki.php.net/rfc/object_cast_magic
Suggestion:
Rename __castTo as __castObject, to be parallel to engine
Question:
Is there no need to implement the get() function in userland?
It "feels" wrong for 1/3 to be missing, but I probably just don't "get
it"
The const example seems quite contrived, given that a) it's allowed to
be unset() and b) PHP has define()
I believe that particular example weakens the RFC rather than
strengthens it.
Re: your conversation with Stas:
I have to agree with Stas.
In short, there is "complexity" and "complexity squared" and this just
seems like "complexity squared" for a handful of edge cases that only
provides syntactic sugar / less typing versus a new feature that is
needed to achieve a goal that currently can't be done.
If it made it possible to achieve the impossible, or even just
simplified your code without such a wide scope for abuse by people who
only think they know what they are doing...
--
brain cancer update:
http://richardlynch.blogspot.com/search/label/brain%20tumor
Donate:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FS9NLTNEEKWBE
Thread (11 messages)