Live data from Hacker News

Has C++ jumped the shark?

johndcook.com

41–50 of 69 posts

Re: Has C++ jumped the shark?

#41
post #30
post #12

Earlier quoted context omitted.

"Massive bloat. Take a look to the Boost libraries and cry." Aside from your tears, what is the evidence that boost is bloated? Too slow? Too much source code? Too many files? I've been using Boost for nearly a decade. It does a ton of useful stuff (from template metaprogramming to fast matrix algebra), it's loosely coupled, and it's insanely fast. Given it's scope, it's the least bloated library of which I know. C++…

> ton of useful stuff (from template metaprogramming to fast matrix algebra), it's loosely coupled, and it's insanely fast It's actually not all that fast in a lot of cases. Boost's matrix manipulation support is particularly slow: http://eigen.tuxfamily.org/index.php?title=Benchmark-August2... Also a lot of the template aerobatics generate a ginormous number of symbols which massively increase the binary size and ca…

"It's actually not all that fast in a lot of cases. Boost's matrix manipulation support is particularly slow"

You've picked a benchmark of the most highly optimized matrix algebra libraries, and found that uBLAS is mid-pack, even though a) it isn't particularly optimized for any platform, and b) its goal is to result in the clearest possible syntax without sacrificing adequate performance. Talk about picking nits.

"Also a lot of the template aerobatics generate a ginormous number of symbols which massively increase the binary size and cache pressure."

When it really matters (which it rarely ever does): man strip

"I've always seen Boost (and to a large extent the STL) as a demo library to show off what's possible with templates rather than something to be used in everyday code"

I worked on shipping commercial products that used boost and the STL, and I did nearly all of my speed-sensitive code with it in grad school. It's far more than a demo library. Like I said before, you don't have to use all of it to use some of it.

Re: Has C++ jumped the shark?

#42
post #20

Languages are tools. Da Vinci with a mop and a bucket of mud would be a better painter than me. In fact I recently saw a video where Kelly Slater surfed a door and a coffee table as impressively as most weekend warriors surf on $700 custom shaped boards. Focus on your skill not the tools. Surfing is more about timing, fitness and knowledge of waves than it is about the board. Likewise coding is more about RAM, CPUs,…

a video where Kelly Slater surfed a door and a coffee table as impressively as most weekend warriors surf on $700 custom shaped boards. I saw a table tennis player all excited about his new carbon fiber paddle. Then one of the club champs picked up the box the new paddle had come in and, using the box as a paddle, proceeded to defeat the player with the carbon paddle.

I had a professor in University that beat some kid who thought he was all that at Table Tennis with a shoe, a baseball bat, a piece of cardboard, an empty plastic bottle, and then his bare hands.

It was absolutely hilarious how pissed this guy was getting with his fancy paddle and his attempts at tricking my professor with trick shots.

Re: Has C++ jumped the shark?

#43
post #38
post #12

Earlier quoted context omitted.

"Massive bloat. Take a look to the Boost libraries and cry." Aside from your tears, what is the evidence that boost is bloated? Too slow? Too much source code? Too many files? I've been using Boost for nearly a decade. It does a ton of useful stuff (from template metaprogramming to fast matrix algebra), it's loosely coupled, and it's insanely fast. Given it's scope, it's the least bloated library of which I know. C++…

Try compiling boost from MacPorts, and wait an hour, and few gigabytes later... Really - it's that big!

It only took you an hour? Man I need a new MacBook Pro.

Re: Has C++ jumped the shark?

#44
post #23

I use C++ often, and what I'd like to see are good datastructures, built right into the language syntax, like Python does that with dicts, lists, tuples, sets etc... I know that STL has these, but using them still feels like some grafted-on afterthought.

TR1 added unordered maps/sets (hash tables) and tuples. Maybe it's because I use STL every day but the interface works fine for me. It takes some getting used to but it's pretty consistent. With the operator overloading it feels just like any built-in language syntax (that's even more true with C++0x's initializer lists).

Re: Has C++ jumped the shark?

#46
post #20

Languages are tools. Da Vinci with a mop and a bucket of mud would be a better painter than me. In fact I recently saw a video where Kelly Slater surfed a door and a coffee table as impressively as most weekend warriors surf on $700 custom shaped boards. Focus on your skill not the tools. Surfing is more about timing, fitness and knowledge of waves than it is about the board. Likewise coding is more about RAM, CPUs,…

"It's a poor craftsman that blames his tools" does not mean, as so many programmers seem to believe, that tools don't matter at all, only skills do, so if someone failed it can't possibly be their tools, only their skill.

It means that part of being an expert craftsman is having the experience and skills to select excellent tools, and the experience and skills to drive those excellent tools to produce excellent results. Blaming your tools means either that you lack skill, or that you chose your tools poorly because you lack the experience and skills to choose correctly. Sitting there and defending bad tools does not impress me; it makes you sound like a craftsman who can not tell the difference between good tools and bad tools... and that's a bad craftsman.

Yes. Tools matter. Good tools won't bring you to your optimum peak performance on your own, but bad tools will guarantee you'll never get there. Bad tools typically take longer to work with, and typically teach bad habits to get around their deficiencies.

Da Vinci with a mop and a bucket of mud may be a better painter than you, but he would never beat Da Vinci with quality tools.

Re: Has C++ jumped the shark?

#48
post #36

Earlier quoted context omitted.

Try stripping debug symbols. As to compile time, the pimpl pattern is your friend here.

I don't know who your audience is. I understand that most (about 2/3) of that data is symbol information. The complaint was obviously that a 200 line file generates 8MB of symbols and takes longer to compile than the rest of the project put together. And the existence of this 200 line file is precicely a pimpl attempt to isolate the C++ brain damage as much as possible. Your point seems to just be agreement with mine…

Perhaps C++ will finally become a scripting language. So you don't get to complain about the compilation cost.

Seriously, I think it's too much trick to do meta-programming in the language. If meta-programming should be allowed, it should be easier, simpler, and for the ordinary people. Just like Ruby.

Re: Has C++ jumped the shark?

#50
post #20

Languages are tools. Da Vinci with a mop and a bucket of mud would be a better painter than me. In fact I recently saw a video where Kelly Slater surfed a door and a coffee table as impressively as most weekend warriors surf on $700 custom shaped boards. Focus on your skill not the tools. Surfing is more about timing, fitness and knowledge of waves than it is about the board. Likewise coding is more about RAM, CPUs,…

> Da Vinci with a mop and a bucket of mud would be a better painter than me.

Maybe. But Da Vinci would never paint the Mona Lisa with a mop and a bucket of mud. If he did, it wouldn't have survived to modern times. Am I stretching the analogy too much?

Paint Mona Lisas, people. With amazing skill and great tools.

Post reply on HN