Live data from Hacker News

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

news.ycombinator.com

181–184 of 184 posts

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

#181
post #105

Earlier quoted context omitted.

Agreed. I had commented on the book on HN about a month ago: https://news.ycombinator.com/item?id=16275341 Excerpt from it: "I found that book very interesting in many regards. I had bought and read it several years ago (out of interest, though I have not worked on C++ professionally). Stroustrup goes into a lot of details about the reasons for many design decisions in the language." That's one of the reasons that ma…

Agreed on D&E, but I think it really does need an update now.

Yes, it is quite some years since it was written.

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

#182

Earlier quoted context omitted.

does Rust basically have the same 'move' semantics as C++ ?

Yes and no. The idea is the same, the implementation is very different. Rust is “move by default, move always means memcpy (and they often can be elided), no move constructors,” to (possibly too) succinctly describe it.

cool.. I didn't realize that move meant memcpy.. does this operation destroy the original object?

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

#183

Piggybacking of this post, if anyone has any similar resources for best practices in modern C I'd be interested. There don't seem to be any moocs that go beyond introductory material and K&R obviously doesn't cover modern tools and methods.

21st Century C is a really good book for writing C11. There is a .pdf of it in Google.

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

#184
post #42

Do you mind asking 'Why C++'? I know that doesn't answer your question and to be honest, I am curious about the resources which come up here too, but C++ can be so painful to learn that I wanted to know what drives you into that direction. I mean, there are alternatives like Rust. Do you have a specific project in mind, need it to fulfill some résumé requirements or something completely different?

First off, my apologies for the late response.

I'd like to learn OpenGL programming, and C seems too painfully low level for that, although I won't argue that it is a lot easier to wrap your head around it. However, this days I've been toying with C++14, and the experience (apart from the dependencies, Makefiles, et al. mess, has been pretty smooth with regards to syntax.

Apart from OpenGL (which seems like a neat way to learn some interesting maths and physics), learning C++ helps delve into many big and important existing codebases, especially databases, and other complex systems. Rust may be designed for that but it isn't used so much in the wild.

Moreover, I want to feel badass in a hardcore low-level hacker way after programming so much in high-level dynamically-typed languages, and contribute my one stone to the future grave of JS/Node (let's hope Atwood's law won't work :P).

Post reply on HN