From: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
---|---|
To: | Marco Colombo <marco(at)esi(dot)it> |
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-27 15:19:31 |
Message-ID: | Pine.LNX.4.33.0310270801210.14845-100000@css120.ihs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, 25 Oct 2003, Marco Colombo wrote:
> 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,
No, it RELIES on it. I.e. code blocks are marked out by how you indent.
I.e. it doesn't look for block markers, then make sure indentation is
right, it uses the indentation to show it where code blocks are.
The fact that tabs are parsed as 8 spaces by Python, when many editors are
set to render them as 4 or 6 makes it quite possible to have a file that
looks like it should run but doesn't. I'll take good old {} anyday.
Just do a google search for "python whitespace tabs" and you'll get about
7820 results back...
> 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.
Not exactly. I still prefer being able to do simple:
if (something) do one thing; constructs
Or put in debug lines that ARE NOT indented so they're easier to see:
function test(var1){
# delete this test var when testing is done
$test_var = "set";
start of code...
}
without worrying about the parser complaining about white space.
Indentation is for ME, not the parser. Having it count as the block
marker just feels wrong to me. I'm not even sure I can explain why
completely, but my above points are just one small part of it.
I agree with you on using the right tool for the job. Except Perl.
The more I use other languages, the less I want to use Perl. Maybe it was
a bad experience as a junior developer long ago with it or something :-)
From | Date | Subject | |
---|---|---|---|
Next Message | BARTKO, Zoltan | 2003-10-27 15:20:52 | table functions + user defined types |
Previous Message | scott.marlowe | 2003-10-27 14:56:26 | Re: Recomended FS |