Computer Science Educators Asked on March 11, 2021
Tl;dr – the subject is enough. For background, read below.
I am a professional, freelance, embedded software developer. I first learned about C++ in the 90s and taught myself from a book C++ for C programmers.
The beauty of that was that it assumed that I knew C and didn’t have to spend chapter after chapter explaining how to declare a variable/what a variable is, function/passing parameters/returning a result, loops, etc, etc, etc.
So, it cut quickly to the chase and I started learning from page 1, rather than skipping forward.
Fast (?) forward a few decades, and I no longer code (much) assembler. Work seems to be split between C, Ada (mostly for defence) and C++.
It has been four years since my last C++ gig, and, industry being conservative does not adopt new version of languages for some time, until they can be seen to be widely accepted as stable (if any of you non-industry guys what to know why, then we generally want to wait until "they get the bugs out of the new compiler". Given that a lot of embedded can be life-critical, you can understand why).
So, now I am seeing ads requiring C++ 2014 and 2017 (and my latest experience is 2003). The delicious irony of this is that I know, from bitter experience, that coding standards will forbid me from using the new features intruded in those versions.
All of my life, I have taught myself new languages & concepts from books. Earlier this year, I took a leap of faith & taught myself Flutter/Dart (for personal, non-professional use) from a Udemy course. That was an eye-opener, and I won’t be responsible for the death of any more trees in future.
But, I digress (this entire screed has been a digression, if you ask me). I have now purchased another Udemy course to learn C++.
And, finally, after all of that, my question is still the same as its title – "I know C++ 2003 How to start learning C++ 2017 ?".
Do I watch the start of each chapter, and skip if I yawn? Do I read the table of contents and take a stab at where to jump in?
Given that you are a group of educators, I imagine that this is not a new situation to you, but am not sure that it has an answer which does not involve the length of pieces of string.
I had a similar problem 8/9 years ago, but with C++11.
The trick is that there is no trick. You simply sit and use the feature you want to use. Besides that it is also beneficial to know C++14 before getting into C++17 and know C++11 before getting familiar with C++14 features. (Obviously prerequisite for C++11 is C++03/98, but that's already covered by OP).
If getting up-to-date with C++17 (C++20 actually was vote in 2020) I would start with feature list grouped here. The problem is that there are so many of them that one may have problems in how to approach them, thus I've provided an ordered list that shows how I would teach it to people:
nullptr
- you won't be using NULL
of 0
for null pointers anymorefor(auto const& e: {1, 2, 3}) { std::cout <<e <<'n'; }
is so cool :)constexpr
specifierstd::vector<...>
so it's important to know how it works and what are problems involved with them (it is not my favourite C++11 feature)std::tuple
std::tie
, prefer structured bindings from C++17 (you can break the rule here and look them up ahead)std::thread
- no more pthreads
!
std::ref
- useful when you want to pass references to other threadsCorrect answer by shycha on March 11, 2021
I would guess that taking such courses is a gross waste of time unless they are specifically focused on recent additions to C++. Most of the "beginning C++ courses" won't even get you to essential new features.
I haven't followed updates to the language for a long time but first, I think that the "new" language is backward compatible with the "old" language (unlike Python). So, what you need are incremental changes in most things to what you already know.
But I also think that the programming style in modern C++ has changed, depending more on library code than was true in the past. What you need to do is find a way to become comfortable with that newer programming style.
I would think that a book like this one from the very capable Scott Myers would get you started. I don't have the book, but Myers has been trustworthy in the past. Use the ideas there to build something significant.
Answered by Buffy on March 11, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP