Live data from Hacker News

Zed Shaw on C++

librelist.com

81–90 of 210 posts

Re: Zed Shaw on C++

#81
post #18

This is the first time I heard of Grace C++[1]. Looks very useful. I was looking for string that can be used for binary data. Looks like they support that too. [1] http://grace.openpanel.com/

Grace is absolutely awesome. The value type and format syntax are exactly the way it should be done.

Re: Zed Shaw on C++

#82
post #14

Bunch of age-old banalities from a famous narcissist on top of front page.. Is there any HN 2.0?

2.0? You really trotted out that cliche? Ok, I'll one-up you:

2005 called, they want their joke back.

Re: Zed Shaw on C++

#83
post #75
post #35

Earlier quoted context omitted.

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.

No, more a nod to Lisp getting "metaprogramming" right when C++ screwed them up. If I've gotta do it, I'd rather do it in a language where the turing completeness wasn't designed to be a tarpit.

And there goes my attempt to trick you into becoming a Lisper :-(

Learn CL inside and out, not because you want to be a better programmer, but penning "Lisp is a Ghetto", if you get it right, will guarantee your name echoes in the hallways of hacker heaven long after we're both gone.

Re: Zed Shaw on C++

#85

Earlier quoted context omitted.

There's this thing called a joke . . . I believe that's waht Zed is making here.

Perhaps you could point out the funny bit.

Oh, you have to read that in the voice of The Comic Book Guy. Then it's fucking hilarious. Here try it:

"You sthee const const &const char[const ] is the proper way to make a thruly safe reference to a conthst char array conthst pointer conthst."

See, prime comedy gold there.

Also, 'cause you guys think the internet should be nothing but a massive academic white paper curated by Knuth, so any amount of hyperbole sends you into a literalism hissy fit.

Re: Zed Shaw on C++

#86
post #33

I 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…

The problem with std::string is that when I type a quoted string in my code, it isn't natively a std::string, it's natively a char* and gets converted to strings. C++'s biggest mistake was not standardizing early on an official object-oriented string datatype. It should have been in the first version of C++, it should have been treated like a primitive type (even if it isn't), and they should have said "thou shalt us…

Regarding const references for temporaries, the advent of rvalue references allows separation of access control and lifetime: http://www.artima.com/cppsource/rvalue.html

Re: Zed Shaw on C++

#87

Earlier quoted context omitted.

There's this thing called a joke . . . I believe that's waht Zed is making here.

Perhaps you could point out the funny bit.

He mocks that you can attach const nearly anywhere in c++ and it seems to do something different. (Note: This is a generalization, an important aspect of many jokes)

Re: Zed Shaw on C++

#88
post #78

Earlier quoted context omitted.

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…

Well, we can agree to disagree here, but my belief is that OO is a impedence mismatch for writing "low-level efficiency of direct pointer manipulation and other C features". It's kind of like saying, "There is no 16 wheel semi truck that can win the Tour De France." Maybe you shouldn't be using a 16 wheel truck.

If we're both posting, we agree that we disagree... (along with agreeing that Paris is the capital of France..)

Anyway, C++ is more like a construction system which can be used to make a bicycle, a semi, or a six-person tandem which could win the Tour De France.

Which is to say it's pretty clunky for a lot of things. But there are still things where both large scale organization and particular low-calls need to coexist - Databases, large graphics programs, etc. It's not impossible to write these in C or Java obviously but I'd still say C++ is cleaner.

Re: Zed Shaw on C++

#89
post #63

Earlier quoted context omitted.

Arguably this might be true, however if you add another requirement to the list Joe posted it isn't. Cross platform code is important to many people. I work on large scale, performance intensive, cross platform applications. Microsoft tells me I should be doing everything in C#. Apple tells me I should be doing everything in Objective C. I just get on with it and use something that works. A language that gives me the…

gcc compiles Obj-C, but without some of the improvements apple has made. I personally wish Obj-C were more common because mindshare is a real issue.

Ironically, the whole iphone apps goldrush seems to have contributed in a big way to increase its mindshare. Obj-C is very beautifully designed, I especially like how it adds message passing OOP to C with very minimal syntax additions. But then calling objc_msgSend for every message send, does have a small performance penalty attached, which mostly static languages like C++ don't have to pay.

Re: Zed Shaw on C++

#90

Call 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…

Spot on, and a far better critique than Zed Shaws rant, that boils down to 'I dislike the syntax' mostly. Many things are done nicely in C++, and C++ provides far better abstractions than C. However, since new language construct have been stacked on C++ for almost 30 years, the language became huge, as well as the possible interactions between language constructs.

The result is that you will rarely find programmers that understand C++ fully. I have seen a lot of awful code that uses C++ as C with classes, badly. Usually, classes and functions have been written with so little understanding of encapsulation that refactoring is painful. And for properly written C++ programs and libraries, it's usually hard to find people to maintain/modify it.

On the other hand, it is also hard to find good ML/Haskell/whatever programmers. And lots of people get away with writing ugly Python or Ruby code.

Post reply on HN