3 ms·
Some advice if you do decide to learn C++: there has been a steady stream of improvements in standard C++ the past 8 years (C++11-17), and some (Bjarne Stroust
by phaedrus 9y ago
Some advice if you do decide to learn C++: there has been a steady stream of improvements in standard C++ the past 8 years (C++11-17), and some (Bjarne Stroustroup, Herb Sutter, others) promote it as a better starting point for beginners under the name 'Modern C++'.
From: https://msdn.microsoft.com/en-us/library/hh279654.aspx https://msdn.microsoft.com/en-us/library/hh279654.aspx
"[...] Over the years, features have been added to the language, together with highly-tested standard libraries of data structures and algorithms. It's these additions that have made the modern C++ style possible.
Modern C++ emphasizes:
Stack-based scope instead of heap or static global scope.
Auto type inference instead of explicit type names.
Smart pointers instead of raw pointers.
std::string and std::wstring types (see <string>) instead of raw char[] arrays.
Standard template library (STL) containers like vector, list, and map instead of raw arrays or custom containers. See <vector>, <list>, and <map>.
STL algorithms instead of manually coded ones.
Exceptions, to report and handle error conditions.
Lock-free inter-thread communication using STL
std::atomic<> (see <atomic>) instead of other inter-thread communication mechanisms.
Inline lambda functions instead of small functions implemented separately.
Range-based for loops [...]"
- krylon 9y agoThank you! Like I said, I am not turning my back on it. I have noticed that C++'s evolution has been gaining momentum over last ten years. I have even read Bjarne's book on the design and evolution of C++ - it was fascinating, and I think it is worth reading even to people who never have used C++. The thing is that from all I have heard and read I get the impression that learning C++ - really learning it, not just C-with-classes - is a long-term commitment. That is why, as I said, I am keeping a safe distance between me and C++. ;-) When the day comes, I will not be entirely unprepared.
- weberc2 9y agoC++ as a language has certainly modernized, but its tools are still stuck in the 90's. Contrary to the increasingly bizarre rationalizations offered up by its proponents, CMake and friends are not acceptable package managers or build tools, at least to those of us who have used newer languages. I don't need a build tool assumes all projects are unique snowflakes in need of their own hand-crafted build system; I just want to get up and running quickly without sticking a bunch of maintenance into my build system. I don't mean to dump on C++; I like the language and I take this post as a sign that things are beginning to improve, and I hope this pace of improvement accelerates. However, I have been disappointed by the head-in-the-sand attitude of some proponents.
- pjmlp 9y agoDepends on which tools we are talking about. QtCreator and Visual C++ (with UWP), are only now allowing what was already quite comfortable with C++ Builder in the 90's. As I posted in another thread, Lucid and IBM had quite advanced environments based on Lisp and Smalltalk environments, that failed on the market due to hardware requirements and heavy price tags. Other than that, I feel your pain. C++ is no longer my daily tool, but I still enjoy using it, and would also like to have better tooling available for when I do. The anti-modules discussion post-CppCon is a good example of what you are stating.
- flohofwoe 9y agoThe funny thing about cmake is though that simple things are indeed simple, you can describe an executable made of several compile units in a single line of cmake script. The problem is that it doesn't enforce any standardization beyond that of how to structure complex projects, especially if external dependencies are involved. PS: I don't think you will find a single "fan" of cmake who would say it's the best thing since sliced bread. Most people know it sucks, but grudgingly admit that its better to have one bad standard than a dozen competing solutions.
- weberc2 9y ago> I don't think you will find a single "fan" of cmake who would say it's the best thing since sliced bread. This happens in all the time. At one point here on HN I lamented that C++ didn't have a build system like Rust's Cargo, and lots of C++ folks came out of the woodwork to argue that Cargo is a shitty tool because it can't support certain byzantine projects. Similar arguments were made in a thread about a new C++ package manager that attempts to modernize C++ package management. Almost all of the pro-CMake arguments focus on how capable it is to handle bizarre projects, without realizing that most such projects are bizarre only because they each had to implement their own build system instead of using one that encouraged them toward some standard structure. I can't recall anyone making an argument that resembled "it's better to have one bad standard than a dozen competing standards", even in response to something like "CMake is the best of all C++ tools, but still a far cry from other languages' tooling." Some people would allude to C++ projects being uniquely difficult to build, and so it would be impossible to emulate another language's tools; however, this too seemed to be confusing "C++ projects lack a standard structure" with "C++ projects can't have a standard structure". I could go on and on.