-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Lentvorski wrote:
> For web stuff, C++ is completely at the
> bottom (you would think that something so popular would have spawned an
> interpreted version rather than completely new languages, no?).

Actually, there are interpreted versions of C++ available. Cint and Ch.
Some would argue Java and C# are interpreted versions of C++ as well. ;-)

>> Yeah, they did the rewrite in 1998. The original post was referring to
>> those fantastic initial browsers developed by 1994 providing some
>> overwhelming advantage to browser projects inheriting that codebase.
> 
> At no point did I claim overwhelming advantage.

Okay, so given the horrid problems the Mozilla project has with its
memory management, why isn't the web littered with
Python/Haskell/Java/whatever web browsers that are far more feature rich
and performant, not to mention more secure and bug free?

> However, the fact that it's already *in* C++ is certainly going to
> change the discussion from "Should we use Java/Python/Perl/Lisp/etc?"
> to "Should we really change from C++?"  It changes the dynamics from
> "go with the flow and avoid blame" to "take the blame if something
> goes wrong (and it always does)."

Developers, particularly on open source projects, *love* to take such
things on. In particular, they love doing that more than they love
working with obviously bad code. Frankly, it isn't nearly as much of a
risk as you are intimating *if* the language offers nothing but
advantages for solving the problem at hand. Heck, that's how stuff ended
up being written in C++ in the first place.

> Inertia is powerful.

So are better tools. By your reasoning it is shocking that almost all
software isn't written in assembler.

>> But your mention of the huge Mozilla rewrite is exactly my point. They
>> ended up keeping basically zero code from the original code base, so it
>> was effectively rewritten from scratch in 1998.
> 
> No, it wasn't.  They pulled out major subsystems and wrote them from
> scratch.  This means that the new subsystems had to fit into where the
> old subsystems sat.

Actually, that was the original plan, as it turned out they ended up
rewriting all but a few tiny bits of the codebase. Several developers on
the project have commented on the fact that it actually would have been
done sooner if they'd not started with the Netscape 4.x code.

>> and been at no additional disadvantage compared to the Mozilla project
>> (and presumably would have an advantage since they had a significantly
>> better programming language to work with). Despite this, Mozilla ended
>> up being the #2 browser out there, and probably one of the best working
>> ones. All of the ones that I think of even coming close to it are also
>> written in C++: IE, Opera, and KHTML-based browsers.
> 
> Microsoft wasn't going to use Java if hell froze over, so the only
> options were C++ or Visual Basic.  Opera targets small systems so is
> stuck on C/C++.  The KDE guys are "Give me Qt or give me death!" zealots
> so nothing other than C++ will do.

Hey, don't forget Safari. That one was implemented in C++ because those
guys at Apple are such big C++ fans... er.. ;-)

Opera was not originally targeted at small systems. Indeed, the first
released implementation was a Windows only application. Rather, that is
where they found they could excel. Opera could very well have gone with
a straight C implementation (indeed, if you listen to C proponents, that
was the only logical choice for small systems), but they didn't.

Microsoft had 3 primary languages: C, C++ and VB. They chose C++. You
might ask yourself *why* those were their three primary choices and why
the IE team, which was explicitly given the power to break all the
development rules (and they certainly broke a lot of them) in order to
beat Netscape, wouldn't consider alternative development languages
(certainly Smalltalk was well supported on Windows at the time *and* had
a reputation for rapid application development, same goes for LISP/CLOS,
 various flavours of Pascal, etc.).

As for the KDE guys... they've got lots of projects implemented in
languages other than C++, but they seem to prefer it for their core
components. That aside, you have to ask yourself, given their inherently
flawed choice of language tools, why they have been so successful as
compared to say the GNUStep project, which even had an initial inertia
advantage over KDE in the beginning.

>> But it's like C++ with automatic memory management.... so surely it
>> would at least be better than C++ for almost any project, right? ;-)
> 
> Pretty much.
> 
> However, it seems that anyone enlightened enough to see the advantage of
> Java over C++ is also enlightened enough to see the advantage of
> Tcl/Perl/Python/etc. over Java.

Yes, and this explains the predominance of these languages in
implementations of core components of the 'net like... mail, dns, web,
bittorrent (I'll give Java props for actually having some decent
bittorrent implementations), etc.

>> Again, I'm not arguing that C++ is the best language. Far from it. I'm
>> merely suggesting that it isn't quite so completely useless. It is
>> popular to trash it largely because it is so widely used.
> 
> Actually, Java has that mantle now.

Nah, the folks who defend Java primarily do so by bashing C++, and the
folks who bash Java are generally just as happy to bash C++, so C++
bashers outnumber Java bashers.

> And there we disagree.  The combination of context-sensitive grammar,
> non-managed environment and static compilation really are major
> misfeatures.
> 
> Even worse, nobody seems really interested in correcting them.  There's
> no particular reason a C/C++ implementation couldn't gain those things.
>  However, anybody who would be motivated to do so seems to realize that
> other languages have already done so and have more benefits besides.

Actually, D is basically those things minus static compilation, and it
could be done even without that if it were deemed important.

- --Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHONcuOagjPOywMBARAnwJAJsEtS3rsRtZif1sbtl5jlvJptLsgQCfcNXf
4UAVTpTgDyLrGtrbZhwX+js=
=Y8Mw
-----END PGP SIGNATURE-----

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to