[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: C++ (was: parser)

On Fri, Jun 18, 1999 at 10:16:47AM -0700, Kurt D. Zeilenga wrote:

> >And no, religious wars will not be tolerated, only constructive
> >comments please.
> But you have not presented anything but religious arguments for
> rewriting OpenLDAP in C++.  You, in effect, have said C++ is
> righteous and C is evil.   Guess I must be a pagan.

Some points that may be useful:

	- C++ has come a long way. I rejected C++ four years ago as being to
messy and not well implemented enough. However, the STL (standard C++
library) is available and in pretty good shape. Furthermore, the language
has been pretty stable for a while now, with no new features. egcs performs
really well, over a wide range of architectures and applications. 

The advent of the STL means that many useful objects are available, with
optimized implementations. For example, the string object is very useful
while still being lightweight.

	- C++ lends itself very well for applications like LDAP. Most
objects can be tought to clean up after themselves. Objects can even cache
themselves is smart ways. This saves tremendously on bookkeeping tasks which
now seem to be an important part of the OpenLDAP source

	- Abstraction would be very useful to support multiple backends
transparently. No nasty function tables to maintain.

Converting to C++ however isn't an incremental process. To benefit, lots of
things have to be redesigned en reimplemented. This might scare of existing

Looking at MySQL, the vastly useful open source sql server, we can see that
C++ has its benefits. MySQL is incredibly stable and has *zero* memory
leaks. I have an MySQL server that's processing milions of statements a day
which has been running uninterrupted for *months*.

I need to shutdown my OpenLDAP servers every week because they exhaust my
virtual memory..

Programmers hate doing cleanup, C++ facilitates this task enormously.


bert hubert.