Re: language war

Поиск
Список
Период
Сортировка
От Jay O'Connor
Тема Re: language war
Дата
Msg-id 3FCCBC0D.9040601@cybermesa.com
обсуждение исходный текст
Ответ на language war  (Jonathan Bartlett <johnnyb@eskimo.com>)
Список pgsql-general
 >I have yet to find a language that is as extensible, powerful, and easily
 >modular as PHP.  My favorite feature is the fact that I can include
 >arbitrary files, using a line of code:
 >include "$next_file.php";
 >Then whichever file shares the name (minus the .php extension) with the
 >$next_file variable will be included.  This enables me to write
engines that
 >allow for event-driven programming in stateless web environments.  I have
 >not been able to find an elegent solution to this problem either in
Perl or
 >PHP.

I'm assuming you meant "either in Perl or Python" since you describe PHP
solution

Dynamically importing modules based on variables like you show above is
certainly possible in Python.   I did for a text parsing that imported a
different parser based on a command line switch from the user.  If you
want details, I can send them, but the gist is that what you are asking
for is possible in Python

Other than that, see my latest post on comp.object for details of
redefining Python classes on the fly for extensibility.




В списке pgsql-general по дате отправления:

Предыдущее
От: Franco Bruno Borghesi
Дата:
Сообщение: how many quotes?
Следующее
От: "Jay O'Connor"
Дата:
Сообщение: Re: language war