3 ms·
This is a disappointingly flamey article: roughly 90% of the comments are from people who got a bad impression of C++ during the pre-standardization days (whic
by timr 17y ago
This is a disappointingly flamey article: roughly 90% of the comments are from people who got a bad impression of C++ during the pre-standardization days (which were admittedly horrible, but long since past). Most of the rest are from people who just skipped straight to Java, or who are so young that they never had to learn C++ at all.
The comments that really drop my jaw are the people who seem to hold up Java as a "better" C++. Java is okay, but from its sketchy real-world performance, to its crappy generic programming support and poor ability to enforce such type-safety basics as const-correctness, I've never been impressed. Take the time to learn C++ for what it is, instead of "C with objects" and you'll find that it's far more elegant than the backlash would suggest.
I think that what most people really hate about C++ stems from the widespread use of legacy compilers that incorrectly implement the spec, or implement older versions of the spec. This problem exists for every programming language in the universe (e.g. Ruby 1.8.6 vs. Ruby 1.8.7 vs. Ruby 1.9), but since C++ is widely implemented by multiple vendors, the problem appears worse. If Python or Java were implemented by Microsoft and GNU and four other smaller companies, you'd see the same horrible compatibility problems with those languages, too.
- deleted 17y ago[deleted]
- coliveira 17y agoThe problem with C++ is not just bad implementation. Nowadays we have excellent, standard-compliant compilers for C++ but there are still rough edges. For example, the amount of garbage you get from template errors. You can "learn" to live with that, but it is something broken in the language, which won't be solved quickly. The amount of care you need to to write correct exception-based programs is another. And the failure of exceptions on method signatures show how we should really avoid some of C++ features.
- icefox 17y agoI would have to agree. I have no doubt that anyone in the early days of C++ probably had a real bad experience and was right to tell people not to use it at that time. I personally still use C++ because of the libraries and tools. With Boost, Qt, WebKit, valgrind, gdb, and others I am simply too productive in C++. If someone told me I could only use the c++ standard library and no other libraries I could probably switch languages pretty quick. I can only imagine what it must have been like before when you got nothing.
- jimbokun 17y ago"If Python or Java were implemented by Microsoft and GNU and four other smaller companies, you'd see the same horrible compatibility problems with those languages, too." There are a lot of Java implementations, and I am not aware of serious compatibility problems between them.
- elq 17y agoThe tiny differences in implementation between the sun and ibm vm's is a regular source of deep and painful frustration for some of the people I work with.
- jobu 17y agoThe one point that I see throughout the article is that every programming shop uses it's own subset of C++. Based on coding conventions, library usage, and business domain I have seen how the C++ code used in different companies can look like a different programming language altogether. My professional experience outside C++ is limited, but I had always assumed this was the same for other languages as well. Is C++ really that much of a different animal from other languages?
- nradov 17y agoIn my experience with Java, the core language is small enough that every company pretty much uses the whole thing. Almost everyone has finally upgraded to using at least the Java 5.0 syntax by now. Occasionally you'll run across silly rules that prohibit things like the ternary operator or multiple returns, but those are minor differences. The big differences come into play with frameworks. Depending on whether you're using Struts/JSF/Hibernate/Spring/etc your code may look completely different.
- tjr 17y agoOccasionally you'll run across silly rules that prohibit things like the ternary operator or multiple returns In avionics software, the ternary operator and multiple returns are often avoided to help ensure better code coverage during verification.
- Confusion 17y agoroughly 90% of the comments are from people who got a bad impression of C++ during the pre-standardization days Zawinski and Thompson are good, but they are not 90% of Zawinski, Thompson, Bloch, Eich, Ingalls, Armstrong and Steele. You're completely misrepresenting the gist of the article. The comments that really drop my jaw are the people who seem to hold up Java as a "better" C++. http://www.paulgraham.com/icad.html http://www.paulgraham.com/icad.html but from its sketchy real-world performance Oh please, don't start that flamewar with these kinds of uninformed, one sided utterances. Java performance has been more than fine for at least five years.
- allenbrunson 17y agoi'm not so sure about that. a few months ago i was working on a project that involves amazon ec2 and s3. amazon gives you a bunch of command-line utilities, written in java, to perform various stuff. every one of them takes a second or two to start up, which really annoyed the heck out of me. that certainly wouldn't have happened if they were written in c++.
- Confusion 17y agoStartup time is, IMHO, not an essential part of a 'performance', as it is usually negligible compared to the time the actual execution (often in the order of weeks) takes. But granted, for the case of small apps performing short lived tasks, JVM startup adds a relatively large amount of overhead, which can be annoying.