Re: [GENERAL] C++ port of Postgres - Mailing list pgsql-hackers

From Tsunakawa, Takayuki
Subject Re: [GENERAL] C++ port of Postgres
Date
Msg-id 0A3221C70F24FB45833433255569204D1F5C2668@G01JPEXMBYT05
Whole thread Raw
In response to Re: [GENERAL] C++ port of Postgres  (Christopher Browne <cbbrowne@gmail.com>)
List pgsql-hackers
From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Peter Geoghegan
> I think that the best thing about C++ is the ability to encapsulate and
> simplify some aspects of resource management quite well, which necessitates
> reimplementing PG_TRY/CATCH. The worst thing about C++ is that ABI
> compatibility is far messier. This makes a C++ port seem less compelling
> to me than the idea first appears.

From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Christopher
> Further, it's not as if C++ is particularly newer than C.  C is about 45
> years old; C++, at 33, hardly seems like a "spry young whippersnapper"
> whose inclusion ought to lead to vast excitement.
>
> The would-be "spry young things" that head to my mind are Rust and Go.  I'm
> not sure it's terribly plausible to have parts of Postgres written in both
> C and (Rust|Go); they're different enough that I'm not sure what
> functionality would mix sensibly.  But I think that would be more
> interesting, all the same.  Perhaps it would work out well to be able to
> create background workers in Rust, or to implement a stored procedure
> language in Go.


First, I'm neither for nor against rewriting PostgreSQL in C++.  But I wonder whether it would really pay for the cost.
I'm worried about these, for example:
 

* Wouldn't it increase the coding and testing burdon?  Coding and testing in C, and coding and testing in C++.
PostgreSQLseem to have many features to develop, and I'm not sure C++ will help to speed up the development of them.
 

* Would it really attract more developers of PostgreSQL itself, not extensions?  FYI, Tiobe Index says C is nearly
twiceas popular as C++.
 

http://www.tiobe.com/tiobe-index/

* Wouldn't it distance some developers if they don't want to learn C++?  As Christopher said, C++ is old and there are
manynewer languages that attract developers -- C#, Swift, Go, Java, JavaScript, etc.  I wonder whether recent
developerswant to spend time in learning complex C++ now.  I learned C++ because it is still the most popular language
ingame development, but maybe I would not want to learn C++ anymore if I didn't know C++.
 

Regards
Takayuki Tsunakawa



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [GENERAL] C++ port of Postgres
Next
From: Tom Lane
Date:
Subject: Re: anyelement -> anyrange