Re: pl/pgsql: END verbosity

From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: <neilc(at)samurai(dot)com>
Cc: <andrew(at)dunslane(dot)net>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pl/pgsql: END verbosity
Date: 2005-06-22 11:25:57
Message-ID: 3769.24.211.165.134.1119439557.squirrel@www.dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Neil Conway said:
> Andrew Dunstan wrote:
>> I'm unkeen. I see no technical advantage - it's just a matter of
>> taste.
>
> There is no "technical advantage" to case insensitive keywords, or
> dollar quoting, or a variety of other programming language features
> that don't change functionality but exist to make using the
> programming language easier.
>

But this doesn't make it easier to use - users don't just include those who
write it. The antecedent language of these, Ada, from which this syntax
comes, was explicitly designed to be reader-friendly as opposed to
writer-friendly, and this is a part of that. I can tell you from experience
of programming Ada a long time ago that I have been profoundly grateful that
this was required in the language when disentangling a badly written 1000+
line long multibranch IF statement. And I still find myself having to hunt
for what sort of block a } is closing in C, and I still find it annoying.

>> We advertise that plpgsql is similar to plsql - we should not do
>> anything to make that less so IMNSHO.
>
> Do you *really* mean that? This principle would mean we should reject
> patches like the CONTINUE statement patch I just applied, for example,
> as PL/SQL has no such construct.
>

Well, perhaps I should have qualified that a bit - we shouldn't do it
gratuitously.

Getting the effect of CONTINUE for nested loops can be sufficiently hard
that it is arguable that implementing it is not just syntactic sugar. I seem
to recall muttering about how implementing GOTO wasn't worth the trouble.

>
>> Terseness is not always good, redundancy is not always bad.
>
> Granted -- but why is redundancy a good thing here?
>

see above

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-06-22 13:54:08 Re: pg_terminate_backend idea
Previous Message Dave Cramer 2005-06-22 11:20:47 Re: PROPOSAL FE/BE extension to handle IN/OUT parameters

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2005-06-22 15:41:49 Re: pl/pgsql: END verbosity
Previous Message Eugen Nedelcu 2005-06-22 08:54:40 Re: thousands comma numeric formatting in psql