You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Behlendorf <br...@hyperreal.org> on 1999/01/29 22:21:46 UTC

C++

My guess would be that taking a mature C program and trying to revamp it to
work in a C++ model is more work and more heartache/madness than simply
writing a new one in C++ from scratch, borrowing liberally perhaps from
other sources, but still a separate development effort.

In fact, I seem to recall Ben Laurie starting up a mailing list to focus on
a C++ rewrite of Apache - Ben, is that list still around?

My personal opinion is that C++ is a frankenstein of a language, and if I
were going to take the time to write a new web server with OO in mind, I'd
do it first in Java, and then code up native methods for any
performance-critical components, such as I/O or regex comparisons, that a
profiling tool shows to be bottlenecks.  

	Brian


--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
History is made at night;                         brian@hyperreal.org
  character is what you are in the dark.

RE: C++

Posted by Eric Anderson <et...@iname.com>.
> The list is, but there ain't no-one talking :-)

Really?  How does one get on it?

> I've yet to understand how people can think C++ is bad and yet still
> think Java is good. If you promise to only ever use pointers in C++ you
> can hardly see the difference.

If you only use references (instead of pointers), lots of exception
handling, and STL, it practically IS Java, except with better IDE/debugging
support.  You lose the WORA of Java, and the nice standard libraries, but
you get better performance and the ability to customize the code in a
platform-specific way.

> Except you don't get templates in Java so you have all the crappy runtime
type-checking.

Templates are cool.  I'm still not clear on why Java interfaces are
(allegedly) better than C++ MI, but that's a non-Apache discussion for sure.

> Don't get me wrong. I like Java. But I like C++, too. Horses for courses.

Java rocks, for some things, but in my mind it still has a couple of major
problems:
poor IDE support
(relatively, compared to native code) poor performance
deployment issues (does your VM support JNI, RMI?  Are your class libs up to
date (with JFC for example)?)

Besides, we already have Java web servers coming out of our ears.

C++ might not be an OOP purist's choice, but for a reasonable OO model,
excellent performance, and very good tool support, it's hard to beat.

-Eric



-----------------
ETA Associates, Inc.
http://www.ultracode.com/


Re: C++

Posted by Ben Laurie <be...@algroup.co.uk>.
Brian Behlendorf wrote:
> 
> My guess would be that taking a mature C program and trying to revamp it to
> work in a C++ model is more work and more heartache/madness than simply
> writing a new one in C++ from scratch, borrowing liberally perhaps from
> other sources, but still a separate development effort.
> 
> In fact, I seem to recall Ben Laurie starting up a mailing list to focus on
> a C++ rewrite of Apache - Ben, is that list still around?

The list is, but there ain't no-one talking :-)

> My personal opinion is that C++ is a frankenstein of a language, and if I
> were going to take the time to write a new web server with OO in mind, I'd
> do it first in Java, and then code up native methods for any
> performance-critical components, such as I/O or regex comparisons, that a
> profiling tool shows to be bottlenecks.

I've yet to understand how people can think C++ is bad and yet still
think Java is good. If you promise to only ever use pointers in C++ you
can hardly see the difference. Except you don't get templates in Java so
you have all the crappy runtime type-checking.

Don't get me wrong. I like Java. But I like C++, too. Horses for
courses.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi

Re: C++

Posted by Renaud Bruyeron <re...@w3.org>.
Brian Behlendorf wrote:
> 
> My guess would be that taking a mature C program and trying to revamp it to
> work in a C++ model is more work and more heartache/madness than simply
> writing a new one in C++ from scratch, borrowing liberally perhaps from
> other sources, but still a separate development effort.
> 
> In fact, I seem to recall Ben Laurie starting up a mailing list to focus on
> a C++ rewrite of Apache - Ben, is that list still around?
> 
> My personal opinion is that C++ is a frankenstein of a language, and if I
> were going to take the time to write a new web server with OO in mind, I'd
> do it first in Java, and then code up native methods for any
> performance-critical components, such as I/O or regex comparisons, that a
> profiling tool shows to be bottlenecks.

Then, if you are thinking Java, check this out:

http://www.w3.org/Jigsaw/

=)

 - Renaud

Re: C++

Posted by Bill Stoddard <st...@raleigh.ibm.com>.
Brian Behlendorf wrote:

> My personal opinion is that C++ is a frankenstein of a language, and if I
> were going to take the time to write a new web server with OO in mind, I'd
> do it first in Java, and then code up native methods for any
> performance-critical components, such as I/O or regex comparisons, that a
> profiling tool shows to be bottlenecks.
> 
APR and jApache :-)

-- 
Bill Stoddard
stoddard@raleigh.ibm.com