Re: [HACKERS] Add some const decorations to prototypes - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] Add some const decorations to prototypes
Date
Msg-id CA+TgmoYjdZ-y9M-Tzy_VHU0tHvJDx_fJwrCSz41ZMB5PZ3g8yA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Add some const decorations to prototypes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Oct 31, 2017 at 8:26 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> ... but I'm not sure that it's an improvement in cases where you have to
> cast away the const somewhere else.

I agree.  I guess I may be in the minority here but I don't really
like decorating things with const too much because I have tended to
find that once you start adding const, you end up having to add it in
more and more places to avoid warnings, and then eventually that
causes you to have to start casting it away.  Perhaps I was just Doing
It Wrong.

Anyway, I don't see much point in having const if you're just going to
have to cast it to non-const.  Then it wasn't really very const in the
first place...

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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Ildus Kurbangaliev
Date:
Subject: Re: [HACKERS] Custom compression methods
Next
From: Ildus Kurbangaliev
Date:
Subject: Re: [HACKERS] Custom compression methods