On 11/29/10 12:41 PM, Johannes Schlüter wrote:
On Mon, 2010-11-29 at 12:18 -0600, la...@garfieldtech.com wrote:
Another advantage here would presumably be performance.  If there's
no
getter defined then the engine could simply map $foo->bar to the
class
member directly (which is really fast) and not to a method, so
there's
no added overhead there.  That still leaves the question of what
happens
with name collisions, though.

Don't kow what you mean by "the engine" in this case? The compiler? - no
the compiler can't a) it has no idea what type $foo is b) think about
inheritance etc. The executor - well there's no win possible.

johannes

I was referring to the compiler I guess. I don't do C so I have no idea what it's capable of. If that's not a possible performance optimization point, then blargh.

I still want to keep the performance implications in mind, as this sounds like something that we'd want to use a lot but could also cost a lot more than it seems at first glance if we're not careful.

--Larry Garfield

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

Reply via email to