On Fri, Oct 26, 2012 at 4:14 PM, Stas Malyshev <smalys...@sugarcrm.com> wrote: > Hi! > >> Some people are in favor of the internal functions being generated by an >> accessor declaration should be invisible and non-callable directly. >> Others are in favor of leaving them visible and callable. > > I think these types are not right. It has nothing to do with > internals/userland, it has to do with wanting more magic that work is a > complex way while allowing user no knowledge and control over what's > going on, or reduced number of simple concepts that interact in a > variety of ways. I think you are presenting the situation inaccurately. This has nothing to do with complex magic and also does not intend to limit the users control. Actually, both approaches are exactly the same, the only difference is whether we additionally put the accessor function into the method table or whether we do not.
I still fail to see where you see complexity come into the picture. You have mentioned inheritance checking, but from what I see the functions doing the inheritance check take generic zend_function*s, so they wouldn't have a problem dealing with code not in the method table. The same applies to pretty much everything else too. After all, there *is* a reason why we have abstractions in the engine ;) To me the situation is as simple as this: I declared a get accessor for $foo. I did not declare the method __getfoo(). So why is that method there? It seems really pointless, counter-intuitive and hacky to me to automatically create methods that do not actually exist (not under that name at least). Nikita -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php