Re: [OT] Choosing a scripting language. - Mailing list pgsql-general

From Marco Colombo
Subject Re: [OT] Choosing a scripting language.
Date
Msg-id Pine.LNX.4.44.0310251759220.23308-100000@Megathlon.ESI
Whole thread Raw
In response to Re: [OT] Choosing a scripting language.  ("scott.marlowe" <scott.marlowe@ihs.com>)
Responses Re: [OT] Choosing a scripting language.
Re: [OT] Choosing a scripting language.
List pgsql-general
On Fri, 24 Oct 2003, scott.marlowe wrote:
> On Fri, 24 Oct 2003, Scott Chapman wrote:
[...]
> > I also love the indentation to
> > differentiate code blocks rather than the junk I'd been used to seeing in
> > Perl and previous languages.
>
> Sorry, that was the one big turnoff for me in Python.  Indentation is
> simple to me, I do it linux kernel style, and don't even have to pay
> attention to it anymore, it's just automatic for me.  I guess I'm just
> used to doing it the old fashioned way.

I don't get it. If you already indent code, what's the problem with
Python? Python _requires_ correct indentation, so it's a problem only
to beginners who don't like indenting (and forces them in doing
the Right Thing). If indentation is automatic for you, you're already
doing it the Python way.
Enforcing correct indentation is not more a burden than enforcing
braces matching (or BEGIN/END): it's just syntax, and comes natural
to most experienced programmers. Python codes is just prettier to
the eyes (and thus, to the mind), just because it's simpler w/o
braces and semicolons (any UNIX/C programmer already has an internal
background parser for that, I know).

BTW, I do 80% of my scripting in PHP (started with PHP/FI), 10% in perl
(perl4) and 10% in python (1.5). PHP is usually web-oriented (but
use php -f sometimes, expecially for cron scripts that share code
with CGI ones). Perl is unbeatable in quick&dirty processing scripts
(Perl can be both _very_ quick and _very_ dirty), Pyhton for anything
bigger and well-designed (and with a GUI). All three should have
a place in your toolbox, and you should use the right tool for the
right task. The same applies to PostgreSQL. I'd never use it as
permanent storage for my Perl hashes or Python dictionaries: old-style
NDBM/Berkeley DB will do (and do well) most of the times.

Don't go with one scripting language, learn them all. Even tcl will teach
you something (not much, I admit).

.TM.
--
      ____/  ____/   /
     /      /       /            Marco Colombo
    ___/  ___  /   /              Technical Manager
   /          /   /             ESI s.r.l.
 _____/ _____/  _/               Colombo@ESI.it


pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Performance failure / automatic restart / cron ?
Next
From: Ron
Date:
Subject: Re: Nullable 'Foreign Key-like' Constraint