Re: Mostly Harmless: Welcoming our C++ friends

From: James Mansion <james(at)mansionfamily(dot)plus(dot)com>
To: Kurt Harriman <harriman(at)acm(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Mostly Harmless: Welcoming our C++ friends
Date: 2008-12-06 20:38:29
Message-ID: 493AE2C5.5020009@mansionfamily.plus.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kurt Harriman wrote:
> The foremost opposing argument seems to have been that there
> should be no attempt to alleviate the existing reserved word
> problem without automatic enforcement to guarantee that never
> in the future can new occurrences be introduced.
Is there anything in the source that would necessarily preclude using the
C++ compiler to build *all* the code?

I'd guess that this would be quite a big patch to do this in any places
where we have implicit conversions from void* to char* etc, but
the result is valid as C and C++ and arguably better documented.

C++ is picky about a few things you can do in C, but most of them
are things I'd rather not do anyway.

Run such a build on the build farm each night, and it will be obvious as
soon as C++-unfriendly code sneaks in.

And who know, maybe eventually we could use C++ properly in the
code.

James

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2008-12-06 21:13:41 Re: user-based query white list
Previous Message Bruce Momjian 2008-12-06 19:41:46 Re: Mostly Harmless: Welcoming our C++ friends