Re: pl/pgsql: END verbosity

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: pl/pgsql: END verbosity
Дата
Msg-id 3769.24.211.165.134.1119439557.squirrel@www.dunslane.net
обсуждение исходный текст
Ответ на Re: pl/pgsql: END verbosity  (Neil Conway <neilc@samurai.com>)
Ответы Re: pl/pgsql: END verbosity  (Neil Conway <neilc@samurai.com>)
Список pgsql-hackers
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





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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: PROPOSAL FE/BE extension to handle IN/OUT parameters
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_terminate_backend idea