News for hackers. Stuff that matters.
Re:Modern C++ for C Programmers: part 5 by mlevental on Wednesday July 25, 2018 @11:03AM (#17609802)
is there a modern C++ for python programmers? i have ~5 years programming in dynamic/interpreted (python/js) and compiled/gc'd(java/go) languages and i'd like to learn a systems language. i'm reading the rust programming book (and it's really good/easy to grok) but i'd also like to learn C++. the problem is that most books are either too easy (C++ as your first language) or too hard (straight into RAII and templates). any suggestions for learning resources? modern being key here (stuff like auto ptrs etc.)
Re:Modern C++ for C Programmers: part 5 by yosyp on Wednesday July 25, 2018 @01:59PM (#17611330)
Yes! And be careful and very picky about what you read! To quote a popular Quora answer [1]:

"If you really want to learn C++, I advise against any and all online tutorials and against most books. Without any kind of quality control, many professional book writers published many awful C++ textbooks that may be easy to read and sell well, but teach lies. Stick with the community-verified book list available at StackOverflow"

In other words, use the StackOverflow list to choose the right teaching material [2]. A Tour of C++ (Bjarne Stroustrup) has been a good refresher, with C++ Primer (Stanley Lippman, Josée Lajoie, and Barbara E. Moo) as the primary reference for further clarification. Also use GeeksForGeeks and LeetCode practice problems.

[1] https://www.quora.com/Which-is-the-best-book-for-learning-c+... [2] https://stackoverflow.com/questions/388242/the-definitive-c-...

Re:Modern C++ for C Programmers: part 5 by gusmd on Wednesday July 25, 2018 @03:25PM (#17612034)
I second the C++ Primer suggestion. It was the book that made the pieces fit in my head.
Re:Modern C++ for C Programmers: part 5 by yoklov on Wednesday July 25, 2018 @12:30PM (#17610508)
Worth noting that auto_ptr is decidedly not modern, it was deprecated in c++11 because it was error prone and replaced with C++11's unique_ptr (and shared_ptr/weak_ptr too sort of, although they have a different use case -- unique_ptr really is basically the same use case as auto_ptr).

I figure you didn't mean to call it out specifically and more meant general smart pointers, but just felt I'd let you know that searching for that terminology may lead you astray.

Re:Modern C++ for C Programmers: part 5 by thestoicattack on Wednesday July 25, 2018 @08:12PM (#17614097)
> deprecated in c++11

Not only that -- it was removed in C++17!

Re:Modern C++ for C Programmers: part 5 by SloopJon on Wednesday July 25, 2018 @01:21PM (#17611012)
After dabbling a bit in C++ after college, then purposely avoiding it for about twenty years, I'm getting back into it for work. I'd say my favorite books for coming up to speed were C++ Common Knowledge, Effective C++ (3rd edition), and Effective Modern C++, more or less in that order. Discovering Modern C++, which I haven't finished yet, has not been as enjoyable.

I wouldn't get too hung up on skipping straight to "modern" C++. Yes, C++11 is a game changer, but the vast majority of what you'll find in the classic recommendations is still worth knowing. Things like type deduction, smart pointers, and move semantics won't be hard to pick up once you've got the basics. Although I haven't read it, Accelerated C++ sounds like a good fit for your situation.

Re:Modern C++ for C Programmers: part 5 by swaroop on Wednesday July 25, 2018 @11:11AM (#17609864)
Re:Modern C++ for C Programmers: part 5 by runevault on Wednesday July 25, 2018 @05:06PM (#17612811)
Been getting back into C++ lately after not using it since college ('02), did not know they were releasing a new edition of Tour of C++, will have to check it out (already read Principles and Practices which was interesting once it got into the meat of C++, and plan to read Myer's effective books at some point).
Re:Modern C++ for C Programmers: part 5 by tsaoyu on Wednesday July 25, 2018 @11:44AM (#17610126)
Ordered a paper version on Amazon UK one month ago. Does anyone get the book already?
Re:Modern C++ for C Programmers: part 5 by bcheung on Wednesday July 25, 2018 @07:42PM (#17613938)
I'm primarily a JavaScript developer nowadays. I used C back in the 80s and 90s but never really used C++. I decided to start teaching myself C++ a few weeks ago. I've been going through "The C++ Programming Language 4th Edition". It only covers up to C++11 but the first 100 pages or so goes through a quick whirlwind overview of the newer "modern" C++. The rest of the book goes more in depth and is a bit basic for most of the text for experienced programmers. So it has both the too easy and too hard parts but at least you can jump around to get somewhere in between. It's not great but it's the best resource I've found so far. I tried some Udemy courses but a lot of them move too slow and assume no programming experience.
Re:Modern C++ for C Programmers: part 5 by hermitdev on Wednesday July 25, 2018 @05:10PM (#17612837)
Probably not quite what you're looking for, as I assume you're looking for a Modern C++ guide for Python developers, but surely the Boost Python source is worth a look for good Modern C++ to interact with Python. Fair warning, the learning curve on understanding or using this library is more like a cliff than a curve. It is very heaving in TMP (Template Meta Programming). That said, if you can make sense of this, you can probably consider yourself a near expert in TMP.