Sam (
l33tminion) wrote2008-06-05 10:30 pm
Entry tags:
Defective C
In the classroom, C++ seemed like a modern language. When I took Java, I thought it seemed rather like C++. When I took C, I thought it seemed rather messy. When I saw C++ again, this time in real code, I was shocked. Every time I've seen C++ code in actual use, it seems far more messy and incomprehensible than Java or even C. Brushing up on C++ for work, I've come to agree with the author of the C++ FQA: C++ is a horrible language.
An interesting question: How critical should a programming reference / guide / source be of the language it discusses? One of my favorite programming books is Effective Java, which I feel improved my Java skills immensely. That book contains a very detailed account of all the weaknesses of Java and notes patterns to avoid copying from the Java standard library, yet the book is very positive about Java as a whole. I'm just starting a book called Let Over Lambda, whose author apparently thinks lisp-style macros are the very definition of win, and it's very interesting so far. And the above FQA is proving quite useful in getting myself reoriented for hacking C++.
An interesting question: How critical should a programming reference / guide / source be of the language it discusses? One of my favorite programming books is Effective Java, which I feel improved my Java skills immensely. That book contains a very detailed account of all the weaknesses of Java and notes patterns to avoid copying from the Java standard library, yet the book is very positive about Java as a whole. I'm just starting a book called Let Over Lambda, whose author apparently thinks lisp-style macros are the very definition of win, and it's very interesting so far. And the above FQA is proving quite useful in getting myself reoriented for hacking C++.

no subject
no subject
Note that the author of the FQA wouldn't disagree with you, he'd just argue that those same programs could be better done in C.
no subject
no subject
no subject
no subject
no subject
I think being able to be critical of something even if you support it overall makes you more useful and believable in any situation. Nothing is perfect, so if you don't address drawbacks or tradeoffs, you don't present a complete picture. Of course, I much prefer teaching programming with a language than teaching a programming language without the greater context of programming.
no subject
I agree that is true in general. The FQA's point, though, goes beyond that. It's not that C++ adds new (or redundant) ways to do stuff, it's that those new features are poorly designed in and of themselves.
Lisp macros, which I'm just starting to understand, reflect that principle well. It's not that they can't cause infinite confusion, they're certainly powerful enough to. But Lisp macros are very well designed, such that the power may be worth the tradeoff in possible confusion.
no subject