--MimeMultipartBoundary
Content-Type: text/plain; charset=us-ascii
Hi
> OK, let's see (citations from the corresponding documentation on the Web):
> Linux: "created as a hobby ... in 1991",
> Looks like all these were designed well before C++ and OO-ness matured
> enough. Cool folks that were behind these projects could not use C++ even
...
> Now, you may say that they could switch to C++ in 1997. This is true, and
> maybe they should have, and maybe they or [more likely] their future
> derivatives will.
People disagree with me. I just ignore them.
(Linus Torvalds, regarding the use of C++ for the Linux kernel.)
Linus has been known to work through the assembly code of the kernel
and do funny stuff like insert GOTO's to speed up the code... so he
doesn't like C++ - it's not suited to what he wants to do.
When you are optimising at the bytecode level you don't want things
creating instances and destroying themselves...
I had some interesting mail somewhere from Davem about optimisation,
but this might be relevant:
http://www.geog.ubc.ca/s_linux/mail/msg03027.html
Basically: Davem does the 'step through assembly' thing too...
-------------
Date: Tue, 15 Apr 1997 03:59:58 -0400
From: "David S. Miller" <davem@jenolan.rutgers.edu>
Subject: Re: while I'm nursing a kernel compile or two...
I've read the squid sources in depth, they use every fast search trick
in the book, some of it is really impressive. ;-) I really like the
things they do in that code for performance.
-------------
> > The ones that are C++ are normally gui-type programs - like KDE etc.
> True, there are many GUIs written in C++. Please note that GUI-type
> programs are often pretty large projects by themselves. Popularity of C++
> for their implementation speaks for C++ rather than against it. There are
I don't completely agree.... I think that it's simply LOTS easier to
write a GUI-type program in C++ than in C (I know someone who tried to
do it in C and it just didn't happen...)
> > Things like jigsaw (from www.w3.org) are really the exceptions.
> I bet you will see more and more of these exceptions. C programs were
> exceptional at some point as well...
Possibly... I think the major reason Jigsaw is written in C
Basically:
1) With C you are pretty sure that your code is efficient. With C++ you can't
really be sure.... unless you are pretty damn hot with C++ and know overhead
values that mere mortals don't.
2) Less people know C++ so you will reduce your 'developer base'.
3) We can't put in the 'top-down' programming design needed to make squid C++
in an effective way.
4) Given OS constraints we HAVE to have threads. I don't see how C++ can
get around 'open' being a blocking system call. I have heard yucky
things about most threads libraries with C++... things go
very funny.
5) Does DW (he does almost all the coding) know C++? Does he (or you,
if you are reading this, DW) have the time to learn C++?
Oskar
-- "Haven't slept at all. I don't see why people insist on sleeping. You feel so much better if you don't. And how can anyone want to lose a minute - a single minute of being alive?" -- Think Twice --MimeMultipartBoundary--Received on Tue Jul 29 2003 - 13:15:44 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:31 MST