|
|
|
|
|
by jamesTee49
928 days ago
|
|
The point he was trying to make is the books for decade are mantra it as safe even though it is not. The new thing in this article rant is set a unique value before nulling and freeing allowing easier tracking of mysterious crash later. When I look thru hundreds of juniors code reviews with C++ coding, I have never seen one doing it (this is with Ivy Leagues or just Udemy/Coursera self-taught background). Even senior C++ devs dont do it. They either depend heavily on profile debugging tools or printf out at certain lines. It is a good article just maybe not for decades experience C++ coders or academically inclined one that dont do large production coding low level algorithmic much (their response is like yours not-perfect use-others-it-is-your-brain-problem)...in C++ (doing many API calls programming don't count...they are merely API programmers). Anyway, companies I worked with already migrated to rust and haskell/erlang to avoid this kind of C/C++ issues - same or even faster speed (some parts code in asm) and 100x times safer and more productive than just C++. C++ in 2023 is just badly hotch-patch up language - ugly, inconsistent, lack advanced features, even the so called biggest reason using: speed totally not match against zig/asm/even Java in some code implementation. At this point using C++ is mostly a laziness of programmers to record the existing "proven" C++ libraries a bit like Cobol - seen these conclusions over 20+ companies I audited across the world. A lot of time, when analysing using C++, it is fast if you measure specific execution timing but then fall apart and burn down the company with lawsuit-litigations when factor in bugs and debugging. Rust and Haskell and especially Erlang (Scala too) just steam-rolled C++ when you do total time (coding-execute-maintain-debugging). Whatsapp is good example of my case, you will never be able to create Watsapp with C++ in those short time and very limited resources - rather than just a couple of programmers for programming, you need a committee and specialized team internal and sometime external to do debugging in C++. C++ was designed for the 486-pentium era where bugs is not important but speed is. Today, just go buy a better hardware and charge end willing paying customers more (military/telecom/medical). C++ is just not worth it unless maybe you need to translate it into another programming language. |
|