Re: language war - Mailing list pgsql-general

From Jay O'Connor
Subject Re: language war
Date
Msg-id 3FCCBC0D.9040601@cybermesa.com
Whole thread Raw
In response to language war  (Jonathan Bartlett <johnnyb@eskimo.com>)
List 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 by date:

Previous
From: Franco Bruno Borghesi
Date:
Subject: how many quotes?
Next
From: "Jay O'Connor"
Date:
Subject: Re: language war