Earlier quoted context omitted.
For some concrete examples of the above: WebKit, Chromium, Gecko, and V8 are all C++. My impression is that there is a very high startup cost with C++ to getting it working on the platforms you want to support and picking the subset that isn't going to screw you. Once you get over the hurdle, the improved memory management (I agree with the post Zed is ranting in response to) starts to pay dividends.
V8 is hardly a ringing endorsement for C++. Just sayin.
Zed Shaw on C++
71–80 of 210 posts
Re: Zed Shaw on C++
#72I've seen this pattern a lot when it comes to the order of learning/mastering languages: C, then C++, then back to C
The novice programmer looks at the code and sees bit, bytes, pointers and functions. The advanced programmer looks at the code and sees class hierarchies, design patterns and frameworks. The master programmer looks at the code and sees bit, bytes, pointers and functions.
Re: Zed Shaw on C++
#73Earlier quoted context omitted.
"const *const char &" is not valid C++ syntax, so I'm pretty sure you can't increment it. Therefore, anyone saying you can increment it doesn't understand it. QED.
There's this thing called a joke . . . I believe that's waht Zed is making here.
Re: Zed Shaw on C++
#74Earlier quoted context omitted.
It has grabbed and maintained complete domination of nearly all performance sensitive code in games and desktop software, for nearly a generation now which is an unprecedented reign in computing history. That's a pretty good start to me.
Are you saying that the complete domination claim is also true in comparison to C ?
Basically, until you can kill C your language really isn't that popular. It's a fad by comparison.
Re: Zed Shaw on C++
#75"If I wanted to fry my brain trying to figure out how to add two numbers with templates I'd go use LISP." Probably just a tongue in cheek comment, but I wonder what he meant.
Probably another run-of-the-mill confusion of macros for templates. "LISP" is a convenient red-herring to throw into PL diatribes; it shows the speaker has some authority since he is "aware" of Lisp, and the glowing and mystical connotations that this, vague, awareness carries.
Re: Zed Shaw on C++
#76I love C++, but I upvoted this because most C vs. C++ rants focus on things that are not actually C++'s biggest problems. This is one of the few C++ rants that actually brings up of legitimate points. They are not reasons that would stop me personally from preferring C++ over C, but they are valid criticisms. P.S. On the subject of format strings vs. cout and the "<<" madness, C++0x's variadic templates will allow a…
Re: Zed Shaw on C++
#77Call me unlucky, but I've never worked at a company that had a high percentage of programmers (myself probably included) that could write solid C++ using anything more than the absolute basics, i.e. basically a C subset. I'd pretty much agree with Zed's rant, that C++ often isn't worth the bother, unless you have a project that specifically requires C++ features, and you have a development team that can actually writ…
Re: Zed Shaw on C++
#78Earlier quoted context omitted.
The best pro C++ argument is that for all its flaws there's nothing out there that completely replaces it and it's still widely used. My own view: I'm not in love with C++, but it's not nearly as bad as everyone makes it out to be. Most of the arguments I hear against C++ are the same tired things I've heard hundreds of times. They all have a grain of truth, but nothing so bad as to condemn the language.
My short rant: C++ is as bad as they say it is. It is horrible, it is the worst language in the world ... except for all the other (a la Winston Churchill and democracy). The horrifical complexifications of C++ are just terrible, yet every one of them has a reason behind it. And also, the horrifical complexities are a bit more optional than the horrifical complexities of, say, Java. There isn't another language that…
Re: Zed Shaw on C++
#79Exceptionally good critique. But there are exceptions: programming for Google's V8 in C++ is a pleasure. I've never seen any interpreter code so clean and easy to extend. Like a breath of fresh air.
In other words, C++ is great until something else has to call it. Then you're hosed and end up wrapping everything in C anyway.
Re: Zed Shaw on C++
#80Earlier quoted context omitted.
"There appear to be a lot of good rants against C++....Are there any good passionate pro C++ versus C arguments?" By definition, the people who write the "entertaining" rants against C++ have an axe to grind. The people who like C++ just silently use it , and feel no need to write advocacy blog posts for the language. Even if they were to blog about it, it would be about as compelling as someone advocating for their…
Good advice generally, but what axes do Zed and Linus have to grind? Sounds like both just think C++ enables too much complexity to be worth the benefits.
My problem though is it's not the right tool for the job. Simply having access to C level APIs doesn't instantly mean your language is awesome at making servers and operating systems. Especially if that same language can't quite figure out what the hell really happens on a copy, or during an exception, or can't make decent strings and data buffers.