Re[8]: Почему так ругают PHP?.
От: eugals Россия  
Дата: 23.05.09 10:18
Оценка: 14 (2)
Здравствуйте, Курилка, Вы писали:

К>Из соображений скорости?

Гвидо пишет:

Let's get rid of unbound methods. When class C defines a method f, C.f
should just return the function object, not an unbound method that
behaves almost, but not quite, the same as that function object. The
extra type checking on the first argument that unbound methods are
supposed to provide is not useful in practice (I can't remember that
it ever caught a bug in my code) and sometimes you have to work around
it; it complicates function attribute access; and the overloading of
unbound and bound methods on the same object type is confusing. Also,
the type checking offered is wrong, because it checks for subclassing
rather than for duck typing.


В принципе, разумно. Мне лично эти проверки никогда ещё не помогли, а наоборот даже мешали пару раз, приходилось воркэраундить.
... << RSDN@Home 1.2.0 alpha 4 rev. 1218>>
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.