Re: JSON Function Bike Shedding

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: "David E(dot) Wheeler" <david(at)justatheory(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: JSON Function Bike Shedding
Date: 2013-02-19 14:04:34
Message-ID: CA+TgmoZ_df0nLT0oR01r+JJ9qGOZwz6MB9o3dG1CHu239JGW=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 18, 2013 at 10:42 AM, Merlin Moncure <mmoncure(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2013-02-19 14:11:53 Re: JSON Function Bike Shedding
Previous Message Andres Freund 2013-02-19 14:00:55 Re: [RFC] indirect toast tuple support