-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andrew Lentvorski wrote: > Christopher Smith wrote: >> 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. > > Ch is non-Free. Cint has more than a few criticisms leveled at it--the > biggest one being how strongly it is welded to Root.
Wow, a language implementation with more than a few criticisms leveled at it: will wonders never cease? > I would recommend Lua over these any day of the week. I've been able to use them successfully from time to time, primarily like Smalltalk workspaces for C++. In general, C and C++ were very much designed with a compiler in mind, so it is not surprising that one can construct a better language by letting go of enough of C and C++'s structure that you can't rightly call it C or C++. That's where Java/C#/PHP/etc. come in to play. >> Some would argue Java and C# are interpreted versions of C++ as well. ;-) > > Not a bad argument, either. Yup. I've similarly argued that PHP is kind of a scripted C/C++. I think the specific phrase I used was something along the lines of: "PHP is C for people who find C too hard, and therefore probably shouldn't program in C... *or* PHP." ;-) >> 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? > > Because we have plenty of web browsers? Because the geeks no longer > consider them interesting? Web browsers are exercises in GUI > programming, which geeks traditionally hate with a passion. When the Mozilla project started, the world was crying out for an alternative to IE, particularly for non-Windows platforms. There was a huge amount of developer interest. Sure there were tons of alternative browsers out there, but they all sucked for one reason or another. People really wanted a browser that sucked less, and a lot of people seemed to think they could build one (indeed, a lot of the criticism levied at the Mozilla project in the early years seemed to be along the lines of: "I could do this way better"). >> 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. > > I disagree. Things got written in C++ because new projects got started > in C++, not because someone rewrote a project into C++. Right, so why, in say 1997, didn't someone sit down and say, "C++ sucks for writing browsers, we should really build one in language X." and then start a new project? Answer: they did, and with the possible exception of OmniWeb, they failed. > I can't even think of any projects that followed that route ... Sigh, I know of several, which is perhaps why I have a strong appreciation for the notion that one language having clear advantages over the other, while alluring at first glance, is perhaps... unwarranted. >>> Inertia is powerful. >> So are better tools. By your reasoning it is shocking that almost all >> software isn't written in assembler. > How long did it take to dislodge assembler? C and Fortran were pretty successful at marginalizing assembly programming, particularly once RISC processors showed up on the scene. > How many companies failed before that lesson got learned? That's the key point though: they tried and failed. People trying isn't an indication of much more than a language having appeal to a certain group of developers. People succeeding is an indicator that perhaps there is a significant enough advantage that it is worth considering the language choice issue before making a move. > It was quite a bit of pain to drill that home (Excel wiped out Lotus by > moving off of assembler first ...) Well, that's one man's story. A lot of people would suggest Excel wiped out Lotus by virtue of being designed from the ground up for the GUI paradigm. >> 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 this refutes my point, how? Because, if they derived no advantage from the inertia of the Netscape 4.x code base, then surely they should have been beaten by someone starting from scratch with a better language tool. Certainly enough people tried that there was a good chance that would happen. > Although, Netscape is the poster child for the worst of both worlds. > They dumped a huge chunk of their codebase without dumping it *all* and > revisiting their initial decisions. Yup, and despite that, they're one of the best if not arguably the best browser available on the market today. How can you screw up that badly *and* use a tool that is so horribly wrong for the job and still beat everyone else?! >> Hey, don't forget Safari. That one was implemented in C++ because those >> guys at Apple are such big C++ fans... er.. ;-) > > For the code *Apple* developed, it was all ObjectiveC. I'm sorry, that's just patently false. Apple contributed back their non-Objective-C changes to the KDE project, and there was much griping about how such a massive set of changes wasn't accompanied by changelogs. When the KDE guys finally pieced together all the changes, Konqueror passed Acid2, just like... Safari. Read the white paper on the project: the Objective-C wrapper was a comparatively small portion of Apple's efforts. >> 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. > > Did it actually? Well, it started before the KDE project did, and there was discussion when both the KDE project and GNOME project started, about whether it was more appropriate for people to just work on GNUStep. > NeXT may have had Studly Caps, but nobody I knew ever > actually had one--if you were going to spend that much, you either got a > Macintosh or a Sun. Which is exactly why GNUStep had so much appeal, and exactly why OpenStep garnered attention and gave Objective-C a real shot (not to mention should have provided GNUStep with more interest and resources). > If you had a Sun, you either programmed in > Suntools/SunWindows or X11/Motif. A very interesting point considering that OpenStep was available for Solaris at one point. >>> 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. > > So, the one thing mentioned actually less than 5 years old and is an > application (as apposed to system software)--Bittorrent--is > demonstrating significant usage of Python and Java. Wait, are you acknowledging there that C++ perhaps isn't inherently worse than other languages for systems software? > You're kinda making my point for me. Postfix and Qmail were both written from scratch, out of disgust for Sendmail, 8-10 years ago. They were both immensely successful at being better solutions than Sendmail for most people, in particular in the areas of security, configuration and performance. They achieved this status within a couple of years of their initial release. Why aren't they written in some other language? Why can't someone come up with an even better implementation using some other language? Similarly BIND and Apache have been maligned and people have come up with solutions that are demonstrably better for most people. Sendmail, Bind and Apache have all had major rewrites in recent times (although Apache 2.0 still struggles a bit to problems with its runtime model and scripting languages). Most of today's successful e-mail clients didn't exist a dozen years ago. I think it is safe to say that at one time or another someone has given a go at writing at least a proper e-mail client using almost every general purpose programming language out there. If C/C++ sucks so much, how did we end up with the ones that were written in C/C++? - --Chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHOVFtOagjPOywMBARAq3vAKCwurQ3vX8p9sghlMEwQUbWnxuYDwCfQrMw mADWem0ub4WrSZHFnKRK3xI= =YytE -----END PGP SIGNATURE----- -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
