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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to