Re: language war

Поиск
Список
Период
Сортировка
От Marc A. Leith
Тема Re: language war
Дата
Msg-id 1070389177.3fccd7b9b01b9@webmail.nuvergence.com
обсуждение исходный текст
Ответ на Re: language war  ("Jay O'Connor" <joconnor@cybermesa.com>)
Список pgsql-general
Enough already!

I don't believe that the PostgreSQL General list is an appropriate place to
debate 'my favorite language is better than your favorite language'.

I've programmed in many different languages (FORTRAN, ALGOL, PL/1, Pascal, C,
many variations of BASIC, Lisp, APL, SNOBOL, COBOL, Modula2, C++, VB, PHP, Java
to name a few), each for a different reason, but each valid at the time, for
the problem at hand. Often, I could chose which I wanted from a selection - I
picked the one that I believed could solve my problem the best.

I've learned in 25 years of coding - there is NO RIGHT ANSWER, NO ONE LANGUAGE
for all uses. (See PL/1 aka PL/C above - Programming Language Complete).

My point is simple - languages come & go. Debate your RELIGIOUS views elsewhere.

Marc A. Leith
redboxdata inc.

E-mail:mleith@redboxdata.com

Quoting Jay O'Connor <joconnor@cybermesa.com>:

>  >>My favorite feature is the fact that I can include
>  > >arbitrary files, using a line of code:
>  > >include "$next_file.php";
>
>  >Dynamically importing modules based on variables like you show above is
>  >certainly possible in Python.
>
> Here's an elaborate example:  I have two modules (A.py and B.py) that
> both define the function test().  My main driver prompts the user for
> input and based on the input will import the module and call test() in
> the imported module, which will print either "module A" or "module B"
> depending on what was imported, or an error message if the input didn't
> matcha  module.  This illustrates a complete example, but you can
> simplify it really to "mymodule = __import__ (next_file)" where
> next_file is a variable name
>
> ====================
> --A.py
> def test ():
>         print "module A"
>
>
> --B.py
> def test ():
>         print "module B"
> --dynamicimport.py
> print "Test Dynamic Import"
>
> request = raw_input ("enter 'a' or 'b'")
> modName = request.upper()
> mod = None
>
> try:
>     mod = __import__(modName)
> except:
>     print "unable to import %s" % modName
>
> if mod:
>     mod.test()
> else:
>     print "Sorry, no appropriate module"
> ====================
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: C Programming with postgres.h - my function crashes the database backend
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: C Programming with postgres.h - my function crashes