Re: Property Overloading RFC
| From: | Christian Schneider | Date: | Tue, 02 Aug 2005 19:07:59 +0000 |
| Subject: | Re: Property Overloading RFC | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-17503@lists.php.net to get a copy of this message | ||
Derick Rethans wrote:
class. The magic methods are responsibly for: - checking if the property actually "exists"This is something I wouldn't encourage as one of the virtues of fully dynamic languages is the "lack" of checking this. Otherwise what happens if e.g. one inherits such a class to extend it? Does it have to know about the get/set methods and the necessary declaration of attributes? And as far as "magic" fields are concerned: IMHO the currently available mechanism of checking the property name against a (possibly e.g. from a DB dynamically created) array in the object is sufficient. So personally I'd not add a language feature as it adds complexity with little (or arguable) gain. My $.02, - Chris