Wygląda na to, że PHP pozazdrościło możliwości językom dynamicznym jak Ruby czy Python. Nie jest to kwestia że języki dynamiczne są ostatnio w modzie, ale modyfikowanie kodu w trakcie wykonywania, otwiera zupełnie nowe możliwości.
Dzięki Olle Jonssonowi (bo ja PHP praktycznie już nie używam i nie śledzę jego rozwoju) dowiedziałem się o czymś co się nazywa runkit:
The runkit extension provides means to modify constants, user-defined functions, and user-defined classes. It also provides for custom superglobal variables and embeddable sub-interpreters via sandboxing.
Do dynamiczności Rubego to jeszcze temu trochę brakuje ;) , ale na pewno rozwój runkita pozwoli na powstanie nowych, ciekawych narzędzi w PHP. Już teraz runkit_method_redefine, pozwala na zrobienie wielu fajnych rzeczy w PHP, które dotąd “to tylko w Rubym” :)
Cóż open source ma naprawdę wiele zalet ;)))
Popularity: 22% [?]




I know, you can tell I tried to hide my damn-this-ain’t-Ruby feelings in the post. But, it ain’t Ruby. The dynamism I sometimes crave isn’t there by default, so you have to contort yourself to get there. (The word Agile may not be the best description of these practices, sometimes you need Acrobatic Software.)
Olle,
Sure it is not Ruby ;) but probably it will be ‘good enough’ reason for many people not to learn new language ;)
With this new feature PHP has even more polluted namespace and new module required to be present. Puzzle with even more pieces than before – I’m really happy I don’t have to deal with PHP more than with my WordPress installations ;)
(Just back from reading the gist of your blogpost through an automated translator. That should be a DHTML effect: Click here to transform text to “pseudo-English” using machine translation!)
True that! “Good enough” is really what one needs. I’m only using it to force unittests into a large body of code I can’t change (without a safety net).