Robert Haas wrote: > > 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.
Agreed. If we went with C++ we would need to be able to turn _off_ some C++ features to keep performance reasonable. I can see trying to use a _few_ C++ features, but in general it isn't worth the effort. -- Bruce Momjian <[EMAIL PROTECTED]> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers