Earlier quoted context omitted.
Uh...I'm talking about the content of the post to which this thread is attached, so: http://librelist.com/browser//mongrel2/2010/7/15/c-verses-c+...
"You'll find crap in C++ like const *const char &, and hell if anyone knows what that really means since even though the pointer to a const to a const reference is consted to hell and back, oh look you can still increment it." I'm still looking for the part where he doesn't understand how const _works_.
Zed Shaw on C++
41–50 of 210 posts
Re: Zed Shaw on C++
#42I agree totally with Zed Shaw on this, but some quick observations: * C++ circa 2000 (before mainline g++ could handle Alexandrescuisms) is significantly different from C++ circa 2010, albeit in ways that probably upset Shaw even more (the more central role boost has taken, the more "expressive" templates have gotten, don't call me on any of this stuff). * C++ std::string is an abomination, but you can always just do…
Alexandrescuisms has 2 hits on google including this page. To what are you referring?
Re: Zed Shaw on C++
#43I agree totally with Zed Shaw on this, but some quick observations: * C++ circa 2000 (before mainline g++ could handle Alexandrescuisms) is significantly different from C++ circa 2010, albeit in ways that probably upset Shaw even more (the more central role boost has taken, the more "expressive" templates have gotten, don't call me on any of this stuff). * C++ std::string is an abomination, but you can always just do…
Alexandrescuisms has 2 hits on google including this page. To what are you referring?
Re: Zed Shaw on C++
#44I've seen this pattern a lot when it comes to the order of learning/mastering languages: C, then C++, then back to C
Why is it that C programmers bitch about C++, but C++ programmers don't bitch about C?
Re: Zed Shaw on C++
#45C++ brings a lot of heavy-weight machinery to the table but the best part is that you don't have to use it. If you just want to write C but desire templates to reduce the amount of writing you need to do then so be it, write C-with-templates!
My big beef with the language is mostly due to the legacy crud it is saddled with in the C preprocessor. Many of the build time issues I find myself suffering with are because of people, for example, including Windows.h a) in the first place and b) not defining WIN32_LEAN_AND_MEAN. Junior (and senior, for that matter!) developers seldom know how to properly structure their code so that their iteration times don't plummet.
Re: Zed Shaw on C++
#46Exceptionally 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.
I don't know if V8 follows the Google C++ Style Guide[1] (I doubt it, but it is possible), but that could explain a lot. I feel that it provides a good balance between power and readability. You don't have the language-within-a-language pattern that arises in some of the boost libraries, but you do get RAII and a few template tricks. The language feels much like a cleaner Java, with very few opportunities to do somet…
Re: Zed Shaw on C++
#47I agree totally with Zed Shaw on this, but some quick observations: * C++ circa 2000 (before mainline g++ could handle Alexandrescuisms) is significantly different from C++ circa 2010, albeit in ways that probably upset Shaw even more (the more central role boost has taken, the more "expressive" templates have gotten, don't call me on any of this stuff). * C++ std::string is an abomination, but you can always just do…
One problem with const-correctness is C++ uses "const&" to mean two different things: it could mean either a reference to a persistent object you're not allowed to change, or it could refer to a temporary object which you're prevented from changing because the changes will disappear. The problem is it conflated access control with lifetime. It would have been better if there were a "temp" keyword - although the last thing C++ needs is more combinatorics of type decorators.
On the subject of consts, though, C++ simply enforces const correctness more, but doesn't the same criticism of confusing const apply to pointers in C as well? You can just as easily declare a "const * const" in C as in C++. So I fail to see why Zed Shaw writing something in C gets him away from that "problem", unless he doesn't write const correct C.
Re: Zed Shaw on C++
#48C++ OO can be done to really abstract the application but still be very manageable and simple. Also C++ is a game industry cornerstone. I think game code in C is actually harder to consume that game code in C++.
Re: Zed Shaw on C++
#49I agree totally with Zed Shaw on this, but some quick observations: * C++ circa 2000 (before mainline g++ could handle Alexandrescuisms) is significantly different from C++ circa 2010, albeit in ways that probably upset Shaw even more (the more central role boost has taken, the more "expressive" templates have gotten, don't call me on any of this stuff). * C++ std::string is an abomination, but you can always just do…
Re: Zed Shaw on C++
#50I've seen this pattern a lot when it comes to the order of learning/mastering languages: C, then C++, then back to C
After getting use to the STL containers... I could never go back to pure C. I use C++ daily and love it. Nothing against C (if that's what you like) it's a great little language. Why is it that C programmers bitch about C++, but C++ programmers don't bitch about C?