5 ms·
This is what I do. Write C in C++. You don't have to use all the fancy new shit. I'll never understand why people get so upset about it.
by alar44 4y ago
This is what I do. Write C in C++. You don't have to use all the fancy new shit. I'll never understand why people get so upset about it.
- bluGill 4y agoThat C in C++ id the part where most of the serious bugs in C++ come from
- ncmncm 4y agoThen you are writing bad C++ code. The new features are added specifically because they enable writing better programs. Avoiding them means you are choosing not to write better programs. It is allowed, but not a thing to brag about. That does not mean every program has to use every feature. But when there is a choice between the new way and the old way to do something, the new way is very probably better. Passing a reference, where you can, is better than passing a pointer. Passing a lambda is better than passing a function pointer. New for-loops are better than old for-loops. A unique_ptr is a better member than a naked pointer. A compiler-generated destructor is better than a hand-coded one. And so on.
- alar44 4y agoAbsolutely, but none of those are really that new. I guess I'm talking more about boost libraries and that stuff. I just can't be bothered and it doesn't matter for anything I need to write.
- ncmncm 4y agoThey are not especially new, but they are not in C. C is the language that invites in mistakes. The less C we code, the fewer mistakes we ship.