RE: [PHP-DEV] do_declare_property()

From: Date: Wed, 12 Jul 2000 16:30:46 +0000
Subject: RE: [PHP-DEV] do_declare_property()
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-24339@lists.php.net to get a copy of this message
> From: Teodor Cimpoesu [mailto:teo@digiro.net] > > Hi Andi! > On Wed, 12 Jul 2000, Andi Gutmans wrote: > > > Yeah but I assume python *knows* what type z is at compile time, right? > > > > Andi > uhm, what for? > Of course it will know it's a class, and when parsing the class def. > the rewrite takes place. > > Of course, we don't really need to have `$this->__bar', I though we > can also have private var $bar', and rewrite the member to > _Class__bar' > to ensure it's `privateness'. > Simple question. Couldn't you have a normal public variable that happened to start with two underscores? Isn't there a $ or something that cannot be used in an ordinary variable that could be used for this internal marker? What would happen in the following example: class test { var __yoyoman; private var yoyoman; } Or even simpler, what if just var __yoyoman was declared? Would the access fail even though it was public? --John Keiser

« previous php.dev (#24339) next »