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

C++ (was: parser)



Gary Williams wrote:
> I've been thinking about the benefits of using C++ as
> well, especially with the inadequate exception handling
> that we currently have.  It's a big decision, though.
> There's a great deal of disparity between various
> compilers, and something that builds with no problem
> on VC++ may not compile using g++.  Since OpenLDAP is
> an Open Source project, we depend on many people being
> able to develop, debug, and understand the source code
> that we produce.  While I'm in favor of using C++, it's
> a very large can of worms, and event the discussion
> is likely to start a holy war between the OO lovers and
> the structurally-oriented.

It would be a monumental task of actually converting everything to C++,
but I guess we could actually convert it bit by bit.
Change the compiler from C to C++ (C++ being able to compile C code) and
then convert some internal structures and functions into classes. We
will need some careful planning here, but I think it is doable. Also if
we stick to standard C++ stuff, and keep it simple I see no reason why
it shouldn't be portable across the board. And no, religious wars will
not be tolerated, only constructive comments please. If we are not yet
ready for something like this then let's put it in our TODO list and
postpone it for 6 months or so and then think about it. But reading
Workstation/Server Expert yesterday and seeing OpenLDAP being mentioned
in an article about LDAP I really think we should be actively thinking
about it...

Pele

P.S. if noone has noticed yet I am also mentioning a parser somewhere in
the text of the original message *hint*


> > -----Original Message-----
> > From: Predrag Balorda [mailto:balorda@bigfoot.com]
> > Sent: Friday, June 18, 1999 11:42 AM
> > To: openldap-devel@OpenLDAP.org
> > Subject: Re: parser
> >
> >
> > Sorry about the long wait..
> > I've uploaded parser.tar.gz to ftp://ftp.openldap.org/incoming.
> > I think I will have some more time now, so I will need people
> > to look at
> > this and tell me what needs to be fixed. It parses ldif files, but it
> > has no integration with the server and I need to do that (it is a bit
> > difficult figuring out the tree-structure looking at the sources, all
> > the parsing is done on lines not on whole files).
> >
> > I was going through the sources and it got me thinking - is
> > C++ a viable
> > option?
> > Given the "object-oriented" nature of LDAP I really think we should
> > seriously
> > start thinking of implementing portions of code in C++. And anything
> > that deals
> > with entries (think of them as objects) would be a prime candidate.
> >
> > Pele