From: | Dmitry Igrishin <dmitigr(at)gmail(dot)com> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>, dandl <david(at)andl(dot)org>, Adam Brusselback <adambrusselback(at)gmail(dot)com>, Joy Arulraj <jarulraj(at)cs(dot)cmu(dot)edu>, kang joni <kangjoni76(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net> |
Subject: | Re: [GENERAL] C++ port of Postgres |
Date: | 2016-08-16 19:42:34 |
Message-ID: | CAAfz9KM0YFyCS-EcnJ3Sc2mnbH-A6simuFGrVy4kM8O9gLG7Yw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
2016-08-16 18:52 GMT+03:00 Heikki Linnakangas <hlinnaka(at)iki(dot)fi>:
> On 08/16/2016 05:47 PM, Jim Nasby wrote:
>>
>> I realize there's little technical reason why we *need* C++ support. The
>> level if discipline applied to our codebase negates some of the benefits
>> of C++. But maintaining the discipline takes a lot of time and effort,
>> and makes it more difficult to attract new contributors.
>
>
> I suspect that it would take as much discipline to keep a C++ codebase
> readable, as the current C codebase. If not more.
For example, its easier and less error prone to define structures with
virtual functions in C++ than write vtables manually in C. So, the adequate
subset of the C++ features can be useful to write more readable and
maintainable C-style code. These features are:
- abstract classes (well, structures with virtual functions);
- RTTI;
- lambda functions;
- constexpr functions;
- destructors;
- templates (very reservedly).
But these features should be avoided (as least for now):
- exceptions;
- the parts of the standard library which generates exceptions
(in particular, regex and thread).
--
// Dmitry.
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2016-08-16 19:47:16 | Re: Jsonb extraction very slow |
Previous Message | Adrian Klaver | 2016-08-16 18:05:51 | Re: Any reasons for 'DO' statement not returning result? |
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2016-08-16 20:04:37 | Re: C++ port of Postgres |
Previous Message | Shay Rojansky | 2016-08-16 19:16:08 | Re: Slowness of extended protocol |