Re: PostgreSQL future ideas - Mailing list pgsql-hackers

From Robert Haas
Subject Re: PostgreSQL future ideas
Date
Msg-id 603c8f070809191859h1400d6e3md090a8b2db8eb5a9@mail.gmail.com
Whole thread Raw
In response to Re: PostgreSQL future ideas  (Andrew Chernow <ac@esilo.com>)
Responses Re: PostgreSQL future ideas  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
> C isn't going anywhere anytime soon.  Look at its history, it has survived
> its 'replacements' over and over again.  The most popular kernels, shells
> and applications are all still written in C (new and old).  Where are the
> warning signs that it is dwindling?

To add to this:

It's easy to underestimate the effect that writing in almost anything
else has on performance.  I once had a job working on a research
operating system written in C++.  It was about 10x slower than
whichever flavor of BSD we were using at the time.  There were a lot
of reasons for this, but I remember that overuse of heavy-weight
template classes was definitely one of them (not to mention a huge
source of code bloat).  Ripping that logic out and replacing it with
something more, erm, C-like paid huge dividends.

There's no problem with using a higher-level language for your
application programming - I do almost all of my coding these days in
Perl or, as it happens, PL/pgsql.   But you really don't want that
programming language to itself be written in another high-level
language.  Core system components like your kernel and database and
compiler need to be fast, and it's pretty hard to get that in anything
other than C.  You could probably make C++ do the job passably well,
but only if you avoid using some of the more inefficient language
features... in other words, only if you make it look as much like C as
possible.

...Robert


pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: Proposal of SE-PostgreSQL patches (for CommitFest:Sep)
Next
From: Russell Smith
Date:
Subject: Re: Where to Host Project