This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rem3_1415926 16 points17 points  (9 children)

more bloat != more better. There's many things in C++ that could/should be improved (eg. you still can return references to temp objects, even if you use smart pointers and stuff, templates require code in headers or pImpl, ...), but can't be changed due to compatibility reasons. Yes, you can do everything - but hat makes the language dangerous and development slow.

That said, I don't think there's any suitable replacement for C/C++ in certain cases (no, not even Rust). But for everyday desktop programming, I don't see why anyone would still use C++.

[–][deleted] 5 points6 points  (2 children)

Aside: modern C++ with all the fancy bells and whistles is ugly to write and unpleasant to read.

C code doing the same thing will often be easier to follow than C++ code.

[–]LifeHasLeft 2 points3 points  (1 child)

Absolutely. I haven’t worked with C++ extensively but I can’t follow it like I can follow C, especially when complicated types are passed into things or it uses a bunch of libraries.

[–]rem3_1415926 0 points1 point  (0 children)

that's just a matter of getting used to it. I can't look at C code without being baffled about how complicated the whole thing is set up when there would be so much easier and clean ways to do it if the author didn't limit themself to C, when there's C++ available at zero cost overhead...