Re: language war

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Chris Travers <chris(at)travelamericas(dot)com>
Cc: Jonathan Bartlett <johnnyb(at)eskimo(dot)com>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, "Jay O'Connor" <joconnor(at)cybermesa(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: language war
Date: 2003-12-02 18:43:06
Message-ID: 3FCCDD3A.6060506@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)Yahoo(dot)com #

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lamar Owen 2003-12-02 18:48:14 Re: perl(Pg) (S)RPM
Previous Message Teodor Sigaev 2003-12-02 18:29:33 Re: C Programming with postgres.h - my function crashes