Re: language war - Mailing list pgsql-general

From Jan Wieck
Subject Re: language war
Date
Msg-id 3FCCDD3A.6060506@Yahoo.com
Whole thread Raw
In response to Re: language war  ("Chris Travers" <chris@travelamericas.com>)
List pgsql-general
Chris Travers wrote:

> 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.  Note: this is only used for UI modules due to obvious security
> concerns, and the variables should be subject to some additional sanity
> checks.

You would like Tcl ... there include is named source ... but you can
redefine it so that the command instead does something completely
different (like using the filename as a key for a DB lookup?).

Or look at the PL/Tcl unknown support. If a PL/Tcl function contains a
call to an undefined proc but a proc "unknown" exists, the latter is
called with some extra information. In the PL/Tcl case it looks into
some tables if the proc is defined there, loads it and does the
initially failed call ... an auto-include totally transparent to you script.


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


pgsql-general by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: C Programming with postgres.h - my function crashes
Next
From: Lamar Owen
Date:
Subject: Re: perl(Pg) (S)RPM