Hi Georges,
georges wrote:
Hi php internals,
I recently discovered the "friendship concept" in c++ and i really love
the concept.
And i wonder if the php internals would be interested to implements it in
the next 7.x major version.
I recently wished PHP had this feature when trying to implement the
Khronos Group Typed Arrays specification in PHP, which requires sharing
certain data between unrelated (inheritance-wise) classes. I ended up
having to expose a public method to get the data, but named in a way
that was likely to deter use.
I think friend classes might be useful, then. I'm not sure if they're
necessarily something we should add to HPP, though. Are there that many
use-cases?
Thanks.
--
Andrea Faulds
http://ajf.me/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php