Re: Mostly Harmless: c++bookends - patch 2 of 4 - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Mostly Harmless: c++bookends - patch 2 of 4
Date
Msg-id 200907140051.49450.peter_e@gmx.net
Whole thread Raw
In response to Re: Mostly Harmless: c++bookends - patch 2 of 4  (Kurt Harriman <harriman@acm.org>)
Responses Re: Mostly Harmless: c++bookends - patch 2 of 4
List pgsql-hackers
On Friday 05 December 2008 11:16:37 Kurt Harriman wrote:
> Just a few additional header files are mentioned in the PostgreSQL
>      Reference Manual for add-on developers to use: fmgr.h, funcapi.h,
>      and spi.h.  This patch adds bookends within those three files for
>      the benefit of beginners writing very simple extensions in C++.

I have signed up to review this patch series for the commit fest.

I can try to debunk this approach for selecting the files to add C++ 
decorations in: A grep through contrib/, which includes a variety of simple 
and complex extensions, shows a count of 80 different backend includes being 
used.

So I think either decoration is added to all of these files or none of them.  
And I think the former is not going to go over well.

>      Documentation and learning are simplified because C example code
>      can be compiled as C or C++ without change.

I think having some subset of header files work with C++ without extra 
decoration and some only with extra decoration will not necessarily improve 
documentation and learning.  Forcing people to add the decorations around 
PostgreSQL backend header files will at least make them remember what they are 
dealing with.


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: final preparations for CommitFest 2009-07
Next
From: Robert Haas
Date:
Subject: Re: Alpha release process