Re: JSON Function Bike Shedding

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: JSON Function Bike Shedding
Дата
Msg-id CA+TgmoZ_df0nLT0oR01r+JJ9qGOZwz6MB9o3dG1CHu239JGW=w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: JSON Function Bike Shedding  (Merlin Moncure <mmoncure@gmail.com>)
Ответы Re: JSON Function Bike Shedding  ("Petr Jelinek" <pjmodos@pjmodos.net>)
Re: JSON Function Bike Shedding  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
On Mon, Feb 18, 2013 at 10:42 AM, Merlin Moncure <mmoncure@gmail.com> wrote:
> if you wanted to.  And yes, I absolutely think this is superior to
> cluttering the public namespace with xml specific verbage, and could
> be extended to other formats.  Look at the other way: we currently
> have encode(format text, stuff bytea).  Would we be better off with
> hex_encode(bytea), escape_encode(bytea)... .etc?

Probably not, but that's not what I proposed either.

> The argument for removing json_ prefix is that when function behaviors
> are unambiguously controlled by the arguments, decorating the function
> name to match the input argument is unnecessary verbosity.

I've come to value greppability of source code pretty highly.  I think
that some of the points you raise are valid, but in my (minority)
opinion overloading creates more problems than it solves.  You're not
going to convince me that get() is *ever* a good name for a function -
you might as well call it thing() or foo() for all the useful
information that name conveys.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [RFC] indirect toast tuple support
Следующее
От: "Petr Jelinek"
Дата:
Сообщение: Re: JSON Function Bike Shedding