C++ is a pleasure to work with.
2 14 Mar 2019 23:17 by u/skruf
The team I work with produces nice readable code, it is usually a breeze to perform maintenance... However that really doesn't prove my point, so feel free to provide some examples why it is not a pleasure.
21 comments
0 u/fuckallyall 14 Mar 2019 23:28
Another point in its favour is that it's not Java.
0 u/NevrThePfhor 27 Apr 2019 00:46
* and & are cancer
0 u/Men13 14 Mar 2019 23:34
The main issue with C++ is the amount of undefined behavior and the very high amount of knowledge you need to write "legitimate" code.
There's just so many pitfals.
That being said - I really love it. It's my favorite language by far.
0 u/skruf [OP] 16 Mar 2019 15:17
0 u/libman 14 Mar 2019 23:39
I don't agree. C/C++ Takes more effort than Rust, D, or especially Nim. C/C++ is uglier code, lots of boilerplate, slower development, and much higher likelihood lethal bugs (which can cost a company millions).
With the aforementioned languages you can still write lower-level code with manual memory management that's as efficient as C/C++, and easily interface with all of C/C++ libraries. But 90% of the time using higher-level features and GC is a good trade-off (and they're still faster than Java, C#, Go, Haskell, etc).
0 u/Drenki 15 Mar 2019 00:53
Most languages are at this point. But C++ has so many features, if you don't know what to do with them, it's very easy to make a mess of things.
0 u/carlip 15 Mar 2019 02:01
Overflow.
0 u/skruf [OP] 16 Mar 2019 15:18
0 u/J_Darnley 15 Mar 2019 10:12
cout << what << the << fuck << is << this << shit0 u/parallel0 17 Mar 2019 11:14
https://www.youtube.com/watch?v=7uLzaKlZSQQ&t=79
0 u/UndeadTed 15 Mar 2019 11:36
meh
0 u/roznak 16 Mar 2019 01:28
Slow compilations,
0 u/skruf [OP] 16 Mar 2019 15:12
Just don't go full retard on meta programming, I guess
0 u/liquidify 18 Mar 2019 04:50
That's one of the best parts of C++ though.
0 u/skruf [OP] 16 Mar 2019 15:09
This one may be subtle, but is fairly obvious to the intermediate C++ developer.
I basically demonstrate wrong use of shared ptr:
Outputs:
0 u/mentalbear 16 Mar 2019 18:08
It's an object oriented programming language, and not a even consistent one.
0 u/skruf [OP] 17 Mar 2019 00:24
I would say it really is not; if it were, we could not have free standing functions or global variables and other fun things... But yeah you can, and should, use OOP designs in C++. C is cool, too. Especially the older versions without type checking.
0 u/Norm 16 Mar 2019 20:52
I love modern c++
0 u/liquidify 18 Mar 2019 04:48
On reason is that the IDE's are still not up to speed. Refactoring in C++ is never as nice as it is in intellij. Additionally, code completion, type hints, and other elements are pretty much fucked in all IDE's when they are behind templates.
0 u/skruf [OP] 18 Mar 2019 09:16
I have found Qt Creator fairly good with this issue
0 u/galabad71 20 Mar 2019 01:24
if you are not disciplined at programming, it is way too easy to shoot yourself in the foot (and everyone else, for that matter) . I much prefer strongly typed languages and BOUNDS CHECKING. also, doing all the memory management yourself is usually a big PITA and except for a few cases is usually better done by the compiler. that being said, if you want to program embedded systems, there really is nothing else but C/C++.