Linked by MOS6510 on Thu 10th Jan 2013 23:25 UTC
General Development "For years I've tried my damnedest to get away from C. Too simple, too many details to manage, too old and crufty, too low level. I've had intense and torrid love affairs with Java, C++, and Erlang. I've built things I'm proud of with all of them, and yet each has broken my heart. They've made promises they couldn't keep, created cultures that focus on the wrong things, and made devastating tradeoffs that eventually make you suffer painfully. And I keep crawling back to C."
Thread beginning with comment 548295
To view parent comment, click here.
To read all comments associated with this story, please click here.
dorin.lazar
Member since:
2006-12-15

The STL and Boost are bloated and ugly; and worst of all they produce the most useless, verbose, garbage compile-time errors.

I see little bloat in STL, although for a while I was misguided as well, and thought that STL was too bloated. It isn't. STL is quite small and quite elegant; I would not be afraid of using it.
With Boost I can agree that it's a bloated animal, but nobody says you should use Boost. It's just too big, and sometimes you need a smart pointer.
But now, C++11 really comes in and saves the day. It does make the STL more efficient, and makes you need less features of Boost. It adds the smart pointers you need in the standard, as well as threading and timing. It's quite nice, you should try it. ;)
The errors are indeed awful; but maybe this is something that can be improved.

Reply Parent Score: 5

Brendan Member since:
2005-11-16

Hi,

As far as I can tell, for all programming languages the majority of problems/bugs are caused by people having trouble dealing with complexity.

The C++ way of dealing with problems caused by complexity is to add more complexity.

- Brendan

Reply Parent Score: 9

kwan_e Member since:
2007-02-18

The C++ way of dealing with problems caused by complexity is to add more complexity.


It's not, as evidenced by the C++11 process. A lot of the effort was made to simplify the language. The "complexity" if you can call it that, mostly came from increasing library features.

Reply Parent Score: 3

ebasconp Member since:
2006-05-09

The C++ way of dealing with problems caused by complexity is to add more complexity.

- Brendan


Are you sure what are you talking about?

C++03:
------
vector<Object*> objs = get_objects();
for (vector<Object*>::const_iterator i = v.begin(); i != v.end(); ++v)
{
cout << (*i)->toString() << endl;
}
for (vector<Object*>::iterator i = v.begin(); i != v.end(); ++v)
delete *i;


C++11:
------
vector<shared_ptr<Object>> objs = get_objects();
for (auto& s : v)
{
cout << s->toString() << endl;
}

The C++11 stuff is easier to read, easier to program, does not need to deal with memory manually and is exception-safe.

Introducing range-based for loops, static type deduction, move semantics, shared pointers and a lot of interesting stuff, they simplified the language, made the libraries more efficient and they kept backwards compatibility.

Edited 2013-01-11 19:48 UTC

Reply Parent Score: 2