httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@ai.mit.edu (Robert S. Thau)
Subject Re: C++ components?
Date Tue, 23 Jul 1996 22:20:41 GMT
  I'd be interested to know about these things:

  1. Would anyone object if I C++-proofed Apache? This would probably not be
  much more than the odd extern "C" in the headers.

There are also probably namespace collisions crawling around which
you'd have to resolve.  I'm not sure how *much* of this there is, but
there's some.

  4. Do any of you actually like C++?

Well, I'll toss in a dissenting vote on this one.  I've seen too many
people get lost in a web of gotchas with C++.  The main problem with
it is that it has all sorts of machinery which *looks* elegant,
simple, and neat, but drags you into a tarpit when you actually try to
use it.  "Smart pointers", for instance, seem like a neat idea, until
you're trapped on the downward spiral of proxy classes and the like
which you have to define in order to actually build and use them.

Likewise, the language doesn't provide any automated storage
management of its own, but provides tools for *you* to do it, if you
choose.  Of course, if you do, then what you find out is that actually
making these things work robustly is very, very hard, and is best left
to the implementors of the language runtime.  (At this point, someone
may pipe up to say that garbage collection has overhead.  Well, yeah,
it does.  However, malloc()/free(), and schemes built upon it, also
have overhead --- often more, in fact, than a well-implemented GC.
See, for instance, http://www.geodesic.com --- when their GC for C++
is linked to an unmodified X server, it gets faster, measured by
x11perf).

One of the things that makes these deficiencies come up so often, of
course, is the failure of the language itself to supply an adequate
library of container types (something that STL may help to rectify,
though it isn't to everybody's taste, and was still missing basics
like hash tables last time I looked), but I'm not at all sure that
covers everything.

  6. Would there be any interest in creating a completely C++ Apache?

Well, see above.  I can see wanting to use a better language than C,
but if you want to find one, then I can easily imagine better ones
than C++ as well, and would probably choose another (Java is, at this
point, a very interesting candidate, but so are Python, Modula-3.
What I'd *really* like is a decent, high-performance implementation of
SML, but the current implementations have an unfortunately high
performance hint.  I'm hoping that when (if!)  CMU produces a
production-quality version of their type-directed research compiler,
this will improve...).

rst

Mime
View raw message