Hi!

> You have already written seven mails all saying how much complexity
> this would introduce. Could you maybe elaborate a bit on that? How
> would it make anything more complex? I mean, the only really

Any code that deals with methods would now have to consider - is this
regular method or special "uncallable" method? Can I call it? Can I list
it in the list of class methods? This leads to weird situation where
current method may not be callable and may not be found by reflection on
$this. And all inheritance functions will have to consider them
separately from all other methods, etc. And interface implementation has
to be changed to account for existence of not-quite-methods. And so have
traits. Etc., etc.
Even conceptually, you need to be aware that there are methods of class
and then there are non-methods which look exactly like methods in almost
every aspect but aren't.

This adds complexity and inconsistency - for no benefit whatsoever (I do
not consider being not able to call __get* benefit since I see no use
case for this requirement).

I want to keep this simple - accessors are fine if they just produce a
set of methods, everybody knows what PHP methods are and how they work,
there would be just couple of more entries in function table, simple
enough and every other part of the engine knows how to take care of such
thing. But if they introduce a complexity of
methods-that-aren't-quite-methods and live in a limbo outside of class
table even though they work as methods, except in cases where they don't
- I'd really rather go back to old trusty __get then - at least it is
clear how that works and you don't have to deal with special cases and
exceptions on every turn.
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to