Re: [PHP-DEV] Dynamic class constants

2004-10-05 Thread Noah Botimer
Andi, I tend to agree with Bob on this one. Class vs. instance is an important distinction and, although the syntactic sugar of being able to reference a static member directly through an object and a scope resolution operator could be nice, I don't think the semantics are necessarily 100% clear.

RE: [PHP-DEV] Dynamic class constants

2004-10-05 Thread Andi Gutmans
designers have somewhat of a responsibility to promote proper coding practices (which should also include standards to some extent). Bob Silva -Original Message- From: Andi Gutmans [mailto:[EMAIL PROTECTED] Sent: Monday, October 04, 2004 6:03 PM To: Marcus Boerger; [EMAIL PROTECTED] Subject: Re: [P

RE: [PHP-DEV] Dynamic class constants

2004-10-04 Thread Robert Silva
ractices (which should also include standards to some extent). Bob Silva -Original Message- From: Andi Gutmans [mailto:[EMAIL PROTECTED] Sent: Monday, October 04, 2004 6:03 PM To: Marcus Boerger; [EMAIL PROTECTED] Subject: Re: [PHP-DEV] Dynamic class constants Hi Marcus, The patch looks

Re: [PHP-DEV] Dynamic class constants

2004-10-04 Thread Andi Gutmans
Hi Marcus, The patch looks fine. Before we commit I just want to make sure that we make sure we don't get bitten by this change sometime in the future. In general, the idea is that writing $obj:: will be like doing class::. It can be useful in places such as Factories and other instances. Althoug

[PHP-DEV] Dynamic class constants

2004-10-03 Thread Marcus Boerger
Hello internals, this patch allows to access class constants by objects. If noone objects i'll commit it on tuesday. Example: class Test { const Foo = 'Bar'; } $obj = new Test; var_dump($obj::Foo); -- Best regards, MarcusIndex: Zend/zend_language_parser.y =