On Sep 25, 2008, at 5:50 PM, Chris Browne wrote:
[EMAIL PROTECTED] ("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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers