Originally posted by pal666
View Post
It's not "bullshit", it's the consensus opinion. Just do a Google search for "C++ too complex" and you get back a zillion hits and blog articles discussing the very topic.
When did C++ get so out-of-hand? Once upon a time, it was C, with classes. Neither more nor less complicated than that. It had C for getting stuff done and classes for keeping the stuff organized. Its current wranglers seem so intent on turning it from C-with-classes into a sophisticated exercise in type theory that the language no longer seems to actually do anything. In C, you can?t write more than a few lines of code without writing a line that at least does something ? it computes something, performs an operation, moves some data around, crunches some numbers. In C++, you can write ? quite literally ? thousands of lines of template classes that do absolutely nothing whatsoever but push types around without ever getting around to actually, y?know, solving a real-world problem.
C++ is just an abomination. Everything is wrong with it in every way. So I really tried to avoid using that as much as I could and do everything in C at Netscape.
... When you?re programming C++ no one can ever agree on which ten percent of the language is safe to use. There?s going to be one guy who decides, ?I have to use templates.? And then you discover that there are no two compilers that implement templates the same way.
... When you?re programming C++ no one can ever agree on which ten percent of the language is safe to use. There?s going to be one guy who decides, ?I have to use templates.? And then you discover that there are no two compilers that implement templates the same way.
{Joshua BlochI think C++ was pushed well beyond its complexity threshold and yet there are a lot of people programming it. But what you do is you force people to subset it. So almost every shop that I know of that uses C++ says, ?Yes, we?re using C++ but we?re not doing multiple-implementation inheritance and we?re not using operator overloading.? There are just a bunch of features that you?re not going to use because the complexity of the resulting code is too high. And I don?t think it?s good when you have to start doing that. You lose this programmer portability where everyone can read everyone else?s code, which I think is such a good thing.
It certainly has its good points. But by and large I think it?s a bad language. It does a lot of things half well and it?s just a garbage heap of ideas that are mutually exclusive. Everybody I know, whether it?s personal or corporate, selects a subset and these subsets are different. So it?s not a good language to transport an algorithm?to say, ?I wrote it; here, take it.? It?s way too big, way too complex. And it?s obviously built by a committee.
Stroustrup campaigned for years and years and years, way beyond any sort of technical contributions he made to the language, to get it adopted and used. And he sort of ran all the standards committees with a whip and a chair. And he said ?no? to no one. He put every feature in that language that ever existed. It wasn?t cleanly designed?it was just the union of everything that came along. And I think it suffered drastically from that.
Stroustrup campaigned for years and years and years, way beyond any sort of technical contributions he made to the language, to get it adopted and used. And he sort of ran all the standards committees with a whip and a chair. And he said ?no? to no one. He put every feature in that language that ever existed. It wasn?t cleanly designed?it was just the union of everything that came along. And I think it suffered drastically from that.
So, no, it's not some sort of crazy notion that C++ is complex. Heck, it has a separate template language! Between needing to be backwards compatible with C and being designed by a committee, you simply can't get a simple, clean language.
>python is designed from ground up for slowness
From what I've read on Guido Van Rossum's blog about the history of Python, "slowness" was never a design criterion. Readability is and changes that would make small improvements to speed at the expense of readability are routinely rejected. Given that a survey of top colleges has just shown that Python has pulled in front of Java as the most-used language for CS101 classes, it seems he did a good job of keeping his language contained.
Comment