4 ms·
Writing safe C++ is harder than plain simple Java.
by nobody0 5y ago
Writing safe C++ is harder than plain simple Java.
- rustissoviet 5y agoYou seems to be a Javascript/Rust guy looking at your post history. It seems that you have learnt C with classes instead Modern C++ because you commented that C++ program has more lines. Modern C++ is concise and much more like Javascript these days. There is this conference video that compare both. You have RAII in Modern C++ so no need to cry for seg faults. It lacks a NPM like package manager but rest is I swear amazing. C++20 Modules will solve this too. Safe is nobody's word except Rustic Propagandists. Writing safe "Modern" C++ is much easier than it was prior 2011. Modern C++ abstractions sometimes made me wonder why people still use Java. C++20's Concepts Lite will make Modern C++ even more safer. Rust is unsafe and you yet to see a software that written in Rust for the Airplane companies, railway etc ...
- EvilEy3 5y agoToo fat.
- pjmlp 5y agoModern C++ is great, but unfortunately most people keep ignoring it, including some major contributors to ISO C++. https://google.github.io/styleguide/cppguide.html https://google.github.io/styleguide/cppguide.html By the way, do you know in C++20 how many ways there are to initialize a variable, without looking at ISO C++20 standard reference?
- ign0ramus 5y agoI wouldn't say they are ignoring it. Case in the point that guide, you linked, recommends targeting recommends using C++17 which I think qualifies as modern. Compiler support for some of the newer features of C++2x hasn't matured yet.[0] That recommendation to avoid them seems sensible. [0] https://en.cppreference.com/w/cpp/compiler_support#cpp20 https://en.cppreference.com/w/cpp/compiler_support#cpp20
- pjmlp 5y agoExcept ISO C++17 doesn't prevent random devs to call malloc()/free()/strcpy()/.... so modern is relative. After reading those guidelines, I suggest reading Google's own code on the context of Android.