Re: JSON Function Bike Shedding - Mailing list pgsql-hackers

From Robert Haas
Subject Re: JSON Function Bike Shedding
Date
Msg-id CA+TgmoZ_df0nLT0oR01r+JJ9qGOZwz6MB9o3dG1CHu239JGW=w@mail.gmail.com
Whole thread Raw
In response to Re: JSON Function Bike Shedding  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: JSON Function Bike Shedding
Re: JSON Function Bike Shedding
List 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 by date:

Previous
From: Andres Freund
Date:
Subject: Re: [RFC] indirect toast tuple support
Next
From: "Petr Jelinek"
Date:
Subject: Re: JSON Function Bike Shedding