Re: RFC: C-sharp style property get/set syntax for PHP

From: Date: Mon, 29 Nov 2010 18:41:56 +0000
Subject: Re: RFC: C-sharp style property get/set syntax for PHP
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-50704@lists.php.net to get a copy of this message
On Mon, 2010-11-29 at 12:18 -0600, larry@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

« previous php.internals (#50704) next »