Live data from Hacker News

Ask HN: Best way to learn modern C++?

news.ycombinator.com

151–160 of 184 posts

Re: Ask HN: Best way to learn modern C++?

#151
post #143
post #17

- Tour of C++ ( http://www.stroustrup.com/Tour.html ) - Principles and Practice Using C++ ( http://www.stroustrup.com/programming.html ) - From Mathematics to Generic Programming ( http://www.fm2gp.com/ ) - The Scott Meyers books Some of the Bjarne Stroustrup videos, "Learning and Teaching Modern C++" - https://www.youtube.com/watch?v=fX2W3nNjJIo Some of the Herb Sutter videos, "Writing Good C++14... By Default" - ht…

As for "Stop Teaching C" video one should also consider this book https://www.amazon.com/Accelerated-C-Practical-Programming-E... Alas, it is c++03. On the other hand it's relatively thin and it begins with the standard library (std::vectors, std::sort, std::string) from the first chapters. So I guess it was the first good book that didn't begin with C language from the start.

Good to see that three decades later, C++ still has a massive inferiority complex about its older brother, C.

Re: Ask HN: Best way to learn modern C++?

#152
post #17

- Tour of C++ ( http://www.stroustrup.com/Tour.html ) - Principles and Practice Using C++ ( http://www.stroustrup.com/programming.html ) - From Mathematics to Generic Programming ( http://www.fm2gp.com/ ) - The Scott Meyers books Some of the Bjarne Stroustrup videos, "Learning and Teaching Modern C++" - https://www.youtube.com/watch?v=fX2W3nNjJIo Some of the Herb Sutter videos, "Writing Good C++14... By Default" - ht…

Is there a progression to this one might follow?

Re: Ask HN: Best way to learn modern C++?

#154

May I ask why do you want to learn modern C++? You should check out Rust, it aims to replace C++ and do a better job in memory management, and developer experience in general (cross-platform compatibility, package management, etc)

I'm not the OP, but I'm tempted to learn more C++ so that I can directly use Qt without relying on language bindings for it. I like the idea of Rust, and maybe some day I'll tinker with it, but it looks like it has quite the steep learning curve.

if you aren't already very familiar with c, i would say the learning curves for c++ and rust are pretty similar. it will take you longer to get stuff to compile in rust, but correcting instances of undefined behavior in c++ can also take a long time in c++.

Re: Ask HN: Best way to learn modern C++?

#155
post #136
post #132

Earlier quoted context omitted.

That's quite irrelevant to the conversation though, we weren't talking about whether OOP is good or not. C++ is very far from "C with classes" today.

Ok but still OOP is the central idea and also there is this trend the most annoying one to always try modeling everything as classes and objects.

plenty of c++ is just functions wrapped in namespaces. namespaces alone are a significant advantage over c.

Re: Ask HN: Best way to learn modern C++?

#156

Earlier quoted context omitted.

I'm not the OP, but I'm tempted to learn more C++ so that I can directly use Qt without relying on language bindings for it. I like the idea of Rust, and maybe some day I'll tinker with it, but it looks like it has quite the steep learning curve.

if you aren't already very familiar with c, i would say the learning curves for c++ and rust are pretty similar. it will take you longer to get stuff to compile in rust, but correcting instances of undefined behavior in c++ can also take a long time in c++.

I know enough of the basics of C and C++, and their standard libraries to shoot myself in the foot with, and I'm sure invoke undefined behavior in the process (I do realize they are separate but related languages). Rust on the other hand appears to be a completely different paradigm from my primary experience which is in managed languages (e.g., Python, Java, etc.). In particular the borrow checker, while a marvelous idea, I think would pose a quite the challenge to get accustomed to.

Re: Ask HN: Best way to learn modern C++?

#157

Earlier quoted context omitted.

if you aren't already very familiar with c, i would say the learning curves for c++ and rust are pretty similar. it will take you longer to get stuff to compile in rust, but correcting instances of undefined behavior in c++ can also take a long time in c++.

I know enough of the basics of C and C++, and their standard libraries to shoot myself in the foot with, and I'm sure invoke undefined behavior in the process (I do realize they are separate but related languages). Rust on the other hand appears to be a completely different paradigm from my primary experience which is in managed languages (e.g., Python, Java, etc.). In particular the borrow checker, while a marvelous…

it's really not that bad. for a beginning programmer, the places where you would struggle with the borrow checker in rust have a lot of overlap with cases in c/c++ where you would struggle to fix all the errors reported by valgrind.

Re: Ask HN: Best way to learn modern C++?

#158
post #89
post #78

Earlier quoted context omitted.

>>Perl is actually thriving and it's never been better to be a Perl programmer :p Don't know about that. But only yesterday afternoon I spent like 2 hours writing a Perl script to heavy lift some Unix file work, Which I factored would take a week at-least to do in any other language. Perl is still largely a very useful language without any replacements. So are awk and sed. Web development world seems to have moved on…

> But only yesterday afternoon I spent like 2 hours writing a Perl script to heavy lift some Unix file work, which I factored would take a week at-least to do in any other language. I'm guessing you're more familiar with Perl, because I personally find it hard to believe that Perl by itself is an order of magnitude more efficient to write than Python or Ruby.

>>I personally find it hard to believe that Perl by itself is an order of magnitude more efficient to write than Python or Ruby.

Ruby is ok. But Perl is million times a better language than Python.

Python is an extremely overrated language.

Post reply on HN