PHP staje się językiem dynamicznym?

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% [?]

Spodobało się? Podziel się z innymi: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Gwar
  • Ma.gnolia
  • Wykop
This entry was posted in Internet, Różne. Bookmark the permalink.

3 Responses to PHP staje się językiem dynamicznym?

  1. Olle Jonsson says:

    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.)

  2. NetManiac says:

    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 ;)

  3. Olle Jonsson says:

    (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).

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>