Re: [OT] Choosing a scripting language.

From: Marco Colombo <marco(at)esi(dot)it>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: Scott Chapman <scott_list(at)mischko(dot)com>, Richard Huxton <dev(at)archonet(dot)com>, Birahim FALL <birahim(dot)fall(at)hispeed(dot)ch>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: [OT] Choosing a scripting language.
Date: 2003-10-25 16:27:00
Message-ID: Pine.LNX.4.44.0310251759220.23308-100000@Megathlon.ESI
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)ESI(dot)it

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Patrick Welche 2003-10-25 17:42:11 Re: no records returned
Previous Message Martijn van Oosterhout 2003-10-25 15:30:46 Re: Performance failure / automatic restart / cron ?