Re: PostgreSQL future ideas - Mailing list pgsql-hackers

From Chris Browne
Subject Re: PostgreSQL future ideas
Date
Msg-id 87r677opyv.fsf@dba2.int.libertyrms.com
Whole thread Raw
In response to PostgreSQL future ideas  ("Gevik Babakhani" <pgdev@xs4all.nl>)
Responses Re: PostgreSQL future ideas  ("A.M." <agentm@themactionfaction.com>)
List pgsql-hackers
pgdev@xs4all.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...)
-- 
(format nil "~S@~S" "cbbrowne" "acm.org")
http://linuxdatabases.info/info/linux.html
"NT 5.0 is the last nail in the Unix coffin. Interestingly, Unix isn't
in the coffin... It's wondering what the heck is sealing itself into a
wooden box 6 feet underground..." -- Jason McMullan


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [PATCHES] Infrastructure changes for recovery
Next
From: Markus Wanner
Date:
Subject: Re: Proposal: move column defaults into pg_attribute along with attacl