4 ms·
What is the point of making this almost religious? Ok, C++ sucks. Now what? I know it's shocking but you will find similar criticisms for any other language out
by allending 17y ago
What is the point of making this almost religious? Ok, C++ sucks. Now what? I know it's shocking but you will find similar criticisms for any other language out there. Just keep an open mind and use the right tool for the job and circumstances at hand. Sometimes it may be something you are uncomfortable with. Do you want to be a programmer or do you want to be a java/c++/python programmer?
- jacquesm 17y agoThat's not how I read it at all. I think it is actually pretty sane stuff in there and you can use it to your advantage when programming C++. It's a pretty subtle kind of humor I think, but I don't think it is meant as a put-down, more an extensive critique from years of experience. You can't know that much about the shortcomings of anything if you haven't spent significant time with it.
- allending 17y agoSubtle humor and critique? If you say so. "And you can also test your code by creating programs that check if it does what you want it to do in a bunch of cases. It's the same with C++ except that it compiles forever and you have to write notable amounts of code to implement the simplest test, so C++ code ends up being tested pretty rarely."
- gloob 17y agoIf I'm not mistaken, the person who wrote the C++ FQAs has a blog (http://www.yosefk.com/blog/ http://www.yosefk.com/blog/) with some rather impressively technical content. He appears to have a fairly solid grasp of what he's talking about, and not to be some (e.g.) Python/Ruby/Perl/etc. programmer who hasn't written a line of C++ in the last five years but will gladly rail against it.
- shin_lao 17y agoThis is unfortunately correct, there is not built in unit testing in C++, you have to use an external library such as Boost.Test.
- wglb 17y agoI agree with jacquesm--see the humor, but take it as cautionary. I did 12 years of C++ and it helps to take the 20% cut. If you look at google's coding standards you can see the restrictions that they put into place. Few modern languages get as much criticism as C++, and I think rightly so. It is very complex, and takes way to long to master. Think of the FQA as a survival guide.
- biotech 17y agoIf you look at google's coding standards you can see the restrictions that they put into place. Keep in mind, though, that reasons for many of those restrictions have to do with maintaining compatibility. This may not be as much of an issue with newer projects. OTOH, Google's coding standards is probably the most thorough, well documented, clear, and easily available set of C++ coding standards out there. For this reason, I don't think it would be a horrible decision to use them for a new project.
- snprbob86 17y agoAs soon as someone bashes a programming language, people start shouting "use the right tool for the job" and, most of the time, I agree. However, I think that is only true if the language really is the right tool for any job. I'm not sure C++ is ever the right tool. And when C++ is a decent tool for the job, it is only with significant policy reducing its feature surface area. The two areas were C++ is strongest are actually better handled by C or by a combination of C and a higher level language.... Systems programming: C code is more predictable; less place for bugs to hide. It also better represents the underlying execution model. Performance critical applications: C offers a standardized binary interface to implement performance critical components with effective interop for business logic written in higher-level languages. That's not to say that C is the be-all, end-all systems or performance language. It's just better suited to the task than C++. Writing an entire application in C OR C++ is almost never using the right tool for the right job.