You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Alexei Kosut <ak...@leland.Stanford.EDU> on 1999/06/24 11:46:51 UTC

Re: cvs commit: apache-2.0/mpm/src/os/unix iol_socket.c iol_socket.h Makefile.tmpl

On 24 Jun 1999 dgaudet@hyperreal.org wrote:

>   I think this is a better i/o layer interface.

[...]

>   +/* it is expected that each io layer will extend this structure as they
>   +    require; they must only ensure that the methods pointer remains in
>   +    the indicated position. */
>    struct ap_iol {
>   -    void *iol_data;
>        const ap_iol_methods *methods;
>    };

You know, I really don't mean to troll, but aren't there are other C-like
languages that are really much better at this sort of thing? Perhaps this
is a good time to at least seriously think about C++ (or a small subset of
it), one more time. So much of the Apache API, past, present and future,
would benefit from having easily available inheritance and polymorphism
that I think it may very well be worth the hassle. Maybe.

Oh, and hi again, folks!

-- 
Alexei Kosut <ak...@cs.stanford.edu> <http://www.stanford.edu/~akosut/>
Stanford University, Class of 2001 * Apache <http://www.apache.org/> *


Re: cvs commit: apache-2.0/mpm/src/os/unix iol_socket.c iol_socket.h Makefile.tmpl

Posted by Tony Finch <do...@dotat.at>.
Bill Stoddard <st...@raleigh.ibm.com> wrote:
>
>C++ is not an easy language to grok to the fullest.

I'm told by people on the standardization committee that nobody groks
it to the fullest.

Tony.
-- 
f.a.n.finch   dot@dotat.at   fanf@demon.net
Winner, International Obfuscated C Code Competition 1998

Re: cvs commit: apache-2.0/mpm/src/os/unix iol_socket.c iol_socket.h Makefile.tmpl

Posted by Bill Stoddard <st...@raleigh.ibm.com>.
Dean Gaudet wrote:
> 
> On Thu, 24 Jun 1999, Bill Stoddard wrote:
> 
> > Chris Costello wrote:
> > >
> > > On Thu, Jun 24, 1999, Alexei Kosut wrote:
> > > > You know, I really don't mean to troll, but aren't there are other C-like
> > > > languages that are really much better at this sort of thing? Perhaps this
> > > > is a good time to at least seriously think about C++ (or a small subset of
> > > > it), one more time. So much of the Apache API, past, present and future,
> > > > would benefit from having easily available inheritance and polymorphism
> > > > that I think it may very well be worth the hassle. Maybe.
> > >
> > >    With the overhead that comes with using C++, it would not be
> > > practical for something like the Apache HTTPd.
> > >
> > What overhead are you referring to? It is possible to write very
> > efficient (in term of space and execution time) C++ programs. You need
> > to have a good understanding of how some of the nifty C++ features are
> > translated into the executable code. C++ is not an easy language to grok
> > to the fullest.
> 
> What nifty features are you referring to?

Jeesh, what a sucker I am. The bait was set and I grabbed it! I suppose
nifty is subjective and I don't care to debate it because I'm not a fan
of adopting C++ for Apache. Check out either of Scott Meyers "Effective
C++" books and you'll get an idea of what I mean (maybe). That's all I'm
saying on this topic :-)

-- 
Bill Stoddard
stoddard@raleigh.ibm.com

Re: cvs commit: apache-2.0/mpm/src/os/unix iol_socket.c iol_socket.h Makefile.tmpl

Posted by Dean Gaudet <dg...@arctic.org>.

On Thu, 24 Jun 1999, Bill Stoddard wrote:

> Chris Costello wrote:
> > 
> > On Thu, Jun 24, 1999, Alexei Kosut wrote:
> > > You know, I really don't mean to troll, but aren't there are other C-like
> > > languages that are really much better at this sort of thing? Perhaps this
> > > is a good time to at least seriously think about C++ (or a small subset of
> > > it), one more time. So much of the Apache API, past, present and future,
> > > would benefit from having easily available inheritance and polymorphism
> > > that I think it may very well be worth the hassle. Maybe.
> > 
> >    With the overhead that comes with using C++, it would not be
> > practical for something like the Apache HTTPd.
> > 
> What overhead are you referring to? It is possible to write very
> efficient (in term of space and execution time) C++ programs. You need
> to have a good understanding of how some of the nifty C++ features are
> translated into the executable code. C++ is not an easy language to grok
> to the fullest.

What nifty features are you referring to?

Dean


Re: cvs commit: apache-2.0/mpm/src/os/unix iol_socket.c iol_socket.h Makefile.tmpl

Posted by Bill Stoddard <st...@raleigh.ibm.com>.
Chris Costello wrote:
> 
> On Thu, Jun 24, 1999, Alexei Kosut wrote:
> > You know, I really don't mean to troll, but aren't there are other C-like
> > languages that are really much better at this sort of thing? Perhaps this
> > is a good time to at least seriously think about C++ (or a small subset of
> > it), one more time. So much of the Apache API, past, present and future,
> > would benefit from having easily available inheritance and polymorphism
> > that I think it may very well be worth the hassle. Maybe.
> 
>    With the overhead that comes with using C++, it would not be
> practical for something like the Apache HTTPd.
> 
What overhead are you referring to? It is possible to write very
efficient (in term of space and execution time) C++ programs. You need
to have a good understanding of how some of the nifty C++ features are
translated into the executable code. C++ is not an easy language to grok
to the fullest.

-- 
Bill Stoddard
stoddard@raleigh.ibm.com

Re: cvs commit: apache-2.0/mpm/src/os/unix iol_socket.c iol_socket.h Makefile.tmpl

Posted by Alexei Kosut <ak...@leland.Stanford.EDU>.
On Thu, 24 Jun 1999, Chris Costello wrote:

> On Thu, Jun 24, 1999, Alexei Kosut wrote:
> > You know, I really don't mean to troll, but aren't there are other C-like
> > languages that are really much better at this sort of thing? Perhaps this
> > is a good time to at least seriously think about C++ (or a small subset of
> > it), one more time. So much of the Apache API, past, present and future,
> > would benefit from having easily available inheritance and polymorphism
> > that I think it may very well be worth the hassle. Maybe.
> 
>    With the overhead that comes with using C++, it would not be
> practical for something like the Apache HTTPd.

Um, no. The C++ language doesn't have any "overhead", regardless of how
stupid the code many programmers manage to create when faced with it (and,
to be honest, this is probably the language's fault). There are really
only two C++ features that cause runtime cost beyond what one might
naively assume based on the C analouges: polymorphism (virtual functions
and the like) and exceptions. Everything else that C++ does is entirely at
compile-time.

That said, I wasn't seriously suggesting that we switch to C++. In fact,
if you check the archives (vis. Dean), you'll find that each time this
discussion comes up, I'm usually on the C side. But I felt that, at the
least, some of Dean's recent work reminded me that we ought to at least
consider the question one more time.

P.S. If I'm not mistaken, both Netscape and Microsoft have web servers
written in C++. The main reasons not to use it are portability and
language/programmer idiocy, not efficiency.

P.P.S. Speaking of languages, last night I was pondering the content
module/cacheing model that I've harped on from time to time in the last
year or so, and I realized that at least partly, configuration of such a
best involves creating a list of content items (data stores, filters,
etc...) based on request parameters. And maybe it was just because it was
4:30 in the morning, but I started to seriously consider using Lisp as a
configuration language for Apache. Then I thought better of it and went to
sleep. Hmm.

-- 
Alexei Kosut <ak...@cs.stanford.edu> <http://www.stanford.edu/~akosut/>
Stanford University, Class of 2001 * Apache <http://www.apache.org/> *


Re: cvs commit: apache-2.0/mpm/src/os/unix iol_socket.c iol_socket.h Makefile.tmpl

Posted by Chris Costello <ch...@calldei.com>.
On Thu, Jun 24, 1999, Alexei Kosut wrote:
> You know, I really don't mean to troll, but aren't there are other C-like
> languages that are really much better at this sort of thing? Perhaps this
> is a good time to at least seriously think about C++ (or a small subset of
> it), one more time. So much of the Apache API, past, present and future,
> would benefit from having easily available inheritance and polymorphism
> that I think it may very well be worth the hassle. Maybe.

   With the overhead that comes with using C++, it would not be
practical for something like the Apache HTTPd.

-- 
Chris Costello                                <ch...@calldei.com>
Who is General Failure and why is he reading my disk?

Re: cvs commit: apache-2.0/mpm/src/os/unix iol_socket.c iol_socket.h Makefile.tmpl

Posted by Dean Gaudet <dg...@arctic.org>.
On Fri, 25 Jun 1999, Ben Laurie wrote:

> Dean Gaudet wrote:
> > 
> > Read the archives, I can't be bothered stating my position for the nth
> > time.
> 
> Awwww ... can't we argue about it again? Pleeeease?

:)

Sure, don't let grumpy old me stop you.

Dean


Re: cvs commit: apache-2.0/mpm/src/os/unix iol_socket.c iol_socket.h Makefile.tmpl

Posted by Ben Laurie <be...@algroup.co.uk>.
Dean Gaudet wrote:
> 
> Read the archives, I can't be bothered stating my position for the nth
> time.

Awwww ... can't we argue about it again? Pleeeease?

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: cvs commit: apache-2.0/mpm/src/os/unix iol_socket.c iol_socket.h Makefile.tmpl

Posted by Dean Gaudet <dg...@arctic.org>.
Read the archives, I can't be bothered stating my position for the nth
time.

Dean

On Thu, 24 Jun 1999, Alexei Kosut wrote:

> On 24 Jun 1999 dgaudet@hyperreal.org wrote:
> 
> >   I think this is a better i/o layer interface.
> 
> [...]
> 
> >   +/* it is expected that each io layer will extend this structure as they
> >   +    require; they must only ensure that the methods pointer remains in
> >   +    the indicated position. */
> >    struct ap_iol {
> >   -    void *iol_data;
> >        const ap_iol_methods *methods;
> >    };
> 
> You know, I really don't mean to troll, but aren't there are other C-like
> languages that are really much better at this sort of thing? Perhaps this
> is a good time to at least seriously think about C++ (or a small subset of
> it), one more time. So much of the Apache API, past, present and future,
> would benefit from having easily available inheritance and polymorphism
> that I think it may very well be worth the hassle. Maybe.
> 
> Oh, and hi again, folks!
> 
> -- 
> Alexei Kosut <ak...@cs.stanford.edu> <http://www.stanford.edu/~akosut/>
> Stanford University, Class of 2001 * Apache <http://www.apache.org/> *
> 
> 


RE: cvs commit: apache-2.0/mpm/src/os/unix iol_socket.c iol_socket.hMakefile.tmpl

Posted by Randy Terbush <ra...@covalent.net>.
Welcome back Alexei.

>
> You know, I really don't mean to troll, but aren't there
> are other C-like
> languages that are really much better at this sort of
> thing? Perhaps this
> is a good time to at least seriously think about C++ (or a
> small subset of
> it), one more time. So much of the Apache API, past,
> present and future,
> would benefit from having easily available inheritance and
> polymorphism
> that I think it may very well be worth the hassle. Maybe.
>
> Oh, and hi again, folks!
>
> --
> Alexei Kosut <ak...@cs.stanford.edu>
<http://www.stanford.edu/~akosut/>
Stanford University, Class of 2001 * Apache <http://www.apache.org/> *