Re: PostgreSQL future ideas

From: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PostgreSQL future ideas
Date: 2008-09-26 15:39:11
Message-ID: 382DA591-60BA-4E7E-AD2D-DD4190F35332@themactionfaction.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


On Sep 25, 2008, at 5:50 PM, Chris Browne wrote:

> pgdev(at)xs4all(dot)nl ("Gevik Babakhani") writes:
>>> Advantage of C++ is that it reduce lot of OO code written in
>>> C in PostgreSQL, but it is so big effort to do that without
>>> small gain. It will increase number of bugs. Do not forget
>>> also that C++ compiler is not so common (so good) on
>>> different platforms. If somebody interesting in that yes but
>>> like a fork ( PostgreSQL++ :-).
>>
>> Reducing OO code that is written in C is one of my major
>> interests. After some investigating myself it appears that having
>> the codebase fully (rewritten in C++ will have an impact on the
>> performance. So I guess such an effort will result the code being
>> more C++ish and fully OO, being a mixture in C with some OO taste.
>
> I'm not convinced that it would a good idea at all to make the system
> "fully OO", nor that C++ would be a meaningful tool to use to that
> end.
>
> After all, C++ can certainly be used in decidedly non-OO ways. For
> instance, STL is NOT an OO framework, and the author of STL, obviously
> something of a fan of C++, characterizes OO as "almost as much of a
> hoax as Artificial Intelligence."
> <http://en.wikipedia.org/wiki/Object-oriented_programming#Criticism>
>
> I tend to agree with that characterization.
>
> Further, C++ suffers from the same "not OO at its base" problem of
> Java, which contributes complexity as well as hurting the "OO-ness" of
> it."
>
>>> Better idea is to start to use C99 in PostgreSQL ;-).
>>
>> I have not investigated this yet. But I am very interested to know
>> what the advantages would be to "upgrade" the code to C99 standards.
>
> It would give us heartburn on any platforms where the preferred
> compiler doesn't grok C99, for sure.
>
> As much as I'm ok with using GCC, it would seem unfortunate to force
> people into using GCC everywhere, and preclude using other compilers.
> (And actually, I'm more ambivalent about GCC than that; I'm not
> totally happy with how GCC has gone, but that's another tale for
> another day...)

Speaking of language choice, no one said that _all_ the source code
would need to be rewritten. It would be nice, for example, if
PostgreSQL rewrote the current GUC system with a glue language like
Lua (which is also very C-like).

Cheers,
M

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-09-26 15:47:03 Re: types for C function composites
Previous Message Merlin Moncure 2008-09-26 15:19:20 types for C function composites

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2008-09-26 15:52:22 Re: PostgreSQL future ideas
Previous Message Andrew Dunstan 2008-09-26 15:20:56 Re: parallel pg_restore - WIP patch