> On Sun, 20 Jul 2008 09:22:36 +0000 (GMT) > "Terje Slettebø" <[EMAIL PROTECTED]> wrote: > > > Unfortunately, the mailing list archive doesn't have a search > > function, and I can't find a FAQ for this, so I'll ask here: Does > > anyone know why C was chosen as an implementation language for > > NetSurf, and not something like C++? > > 1) Reliability, availability, quality, performance and price of > compilers available at the time.
Well, BeOS (userland at least) was written mostly in C++ and it worked quite well, and that was 10 years ago or more. I think it's more due to lack of knowledge about it. Granted they only later switched from mwcc to the freely available gcc. > 2) Familiarity, readability, performance and portability of C. Well, it's exactly the reason some head developers at Haiku chose to rewrite parts (in the kernel) that were written in C in BeOS as C++. Like OpenBFS. I don't like much C++ inside the kernel for some odd reason, but it has some use it seems. And mind you, I jumped into BeOS around 2000, and never did any C++ before, and I fitted the gloves in a snap. That is, the Be API doesn't make use of templates or so, so it's very readable. OTH, templates are used in our kernel to simplify list managment, but that part can sometimes get not as readable as meant :) > 3) I don't think NetSurf would have got as far as it > has if it were written in any other language - a huge number of > people > understand C, and I can count the number of people I trust to write C > ++ > on the fingers of one hand. We've had contributions, both small and > large, for a large variety of people. I'm quite confidant that if it > were written in C++, we would have received a great deal fewer > contributions. It certainly wouldn't have received any from me, for > example. Well, I think Haiku proves one can write a big free software project in C++ with lots of contributors. I invite you to come and read the code by yourself and make an opinion about it: http://dev.haiku-os.org/browser/haiku/trunk > > 4) I don't know about the others, but I hate C++ almost as much as I > hate Perl and Ruby. It's an ugly and hideously complex language. Well, noone forces you to use STL... At least here nobody objected me putting C++ code in for BeOS (which is necessary because its API is C++), but I know some projects with people so anal about it it's a hard time just putting a single .cpp in... Anyway, as long as it works... :) François. (gahh, why doesn't replyto send to the list!?*$)
