3 ms·
Sometimes, it is more important to have the right problem than the best solution. Perhaps unwittingly, this statement fits C++ perfectly. It's popular to criti
by philwelch 16y ago
Sometimes, it is more important to have the right problem than the best solution.
Perhaps unwittingly, this statement fits C++ perfectly. It's popular to criticize C++'s design, but it solves the right problem for a lot of people, and that is why it's still very widely used.
- anon_d 16y agoSometimes, it is more important to have the right problem than the best solution. Perhaps unwittingly, this statement fits C++ perfectly. It's popular to criticize C++'s design, and this is why. It's the best solution to the wrong problem.
- jrockway 16y agoI have a keyboard whose motto is "good feeling of oneness with cup rubber". I feel like C++ could have a similar slogan -- "good feeling of oneness with my imagination". People choose C++ because they want speed, and then they assume that no matter what they do, they'll get it. But what I've found is that after you add smart pointers and perl-compatible regexes and STL and ..., your code does not run fast anymore. You think it does, because hey, C++ is fast... but it doesn't. So you're using C++ for speed, which is its only advantage, but you did it wrong and you aren't even getting the speed. But you are happy because you think you are. Sigh.
- bff 16y agoI feel compelled to disagree with people who insult C++ for the fun of it. In response to what you said, the STL is optimized and fast. You shouldn't be using that many smart pointers because allocating memory on the heap is usually not the best solution. If all you want is perl regex then you're right, perl would be the better choice.
- jrockway 16y agoWhat I'm saying is that people who are bad at C++ get all of the bad parts (memory allocation hell) but none of the good parts (supar speeeeeed). Since most people are bad at programming, it confuses me why they want to use a tool that makes them look bad when they could trade a little theoretical speed for a program that actually runs. Wait, I answered my own question.