Date: 07/12/00
- Next message: Chris Adams: "Re: [PHP-DEV] Re: [PHP] PHP database syntax/construct: can we make it better?"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #5553 Updated: Internal data corruption"
- In reply to: Teodor Cimpoesu: "Re: [PHP-DEV] do_declare_property()"
- Next in thread: Mathieu Kooiman (ggInternet): "Re: [PHP-DEV] do_declare_property()"
- Reply: Mathieu Kooiman (ggInternet): "Re: [PHP-DEV] do_declare_property()"
- Reply: Teodor Cimpoesu: "Re: [PHP-DEV] do_declare_property()"
- Reply: Kristian Köhntopp: "Re: [PHP-DEV] do_declare_property()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 16:13 12/07/00 +0300, Teodor Cimpoesu wrote:
>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'.
I think you missed what I said.
Consider the following example:
function foo($obj)
{
$obj->bar;
}
You have no idea what type (and/or class type) $obj is at compile-time.
So you can't know if $obj's bar property is private or not.
However, if you'd have the following syntax:
function foo(class MyObject $obj)
{
$obj->bar;
}
You could know at compile time if the MyObject class's bar member was
defined as private.
Andi
--- Andi Gutmans <andi <email protected>> http://www.zend.com/-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Chris Adams: "Re: [PHP-DEV] Re: [PHP] PHP database syntax/construct: can we make it better?"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #5553 Updated: Internal data corruption"
- In reply to: Teodor Cimpoesu: "Re: [PHP-DEV] do_declare_property()"
- Next in thread: Mathieu Kooiman (ggInternet): "Re: [PHP-DEV] do_declare_property()"
- Reply: Mathieu Kooiman (ggInternet): "Re: [PHP-DEV] do_declare_property()"
- Reply: Teodor Cimpoesu: "Re: [PHP-DEV] do_declare_property()"
- Reply: Kristian Köhntopp: "Re: [PHP-DEV] do_declare_property()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

