Live data from Hacker News

Master C++ Programming with Open-Source Books

ossblog.org

41–50 of 106 posts

Re: Master C++ Programming with Open-Source Books

#41

Can you ever really master C++? I've been at it more than 20 years and I'm still delighted to learn new things about the language and the library.

For me, that's the standard argument about C++ having unnecessary complexity.

You don't keep learn new stuff because C++ is super, uber, powerful. It is because it is not designed well and there are far too many dark corners.

Re: Master C++ Programming with Open-Source Books

#42
post #14

Earlier quoted context omitted.

> It has a few standards, which is the problem. You mean C++03, C++11, C++14, C++17? Or something else? If you mean those, I fail to see the problem. The language isn't dead, so it's not static, and it evolves over time. Publishing a new standard every few years is the only way to keep all compilers aligned, rather than each going off in its own "with extra features!" direction.

Yes, those. The differences between standards aren't trivial, and often the older standards have to be maintained. The standard already has lots of features, including a turing-complete sub-language. It is difficult to write code to standard (nothing that works, but is undefined either), that is safe, no segfaults, memory issue, secure, and all within a practical budget/timeline. Just being able to reason about the c…

What about smart pointers from c++11 onward? Seems like there are less reasons to have code seg fault these days.

Re: Master C++ Programming with Open-Source Books

#43

Can you ever really master C++? I've been at it more than 20 years and I'm still delighted to learn new things about the language and the library.

And that's the real problem with C++. You can spend 20 years solving real problems with it and still feel like a noob when you take a look at "idiomatic" template code from the standard headers. On the other hand, people like Scott Meyers have spent their lifetime and careers explaining its intricacies, without solving any real problems.

Problem? On the contrary, it's one of the wonderful things about the language and community. It's alive and evolving.

And what's with the Scott Meyers ding? I think of him mostly as an educator and in that respect he's very accomplished.

Re: Master C++ Programming with Open-Source Books

#45
post #35

I have some C programming experience and I wanted to learn C++ so I bought and started reading Stoustrop's book, thinking it's the K&R of C++. It's the worst programming book I have ever read! It's introduction made me hate C++ and if I didn't had to work with other C++ libraries, I would have avoided C++. The text is full of bloat, for the lack of better word. It's the opposite of crisp writing. I read some good lan…

>thinking it's the K&R of C++. You nailed it with that analogy though. K&R is a "first book" and important historically, but right now it's an atrocious book if you want to learn current C and this has been the case for a long, long time. Sometimes these first books don't withstand the test of time.

What's a good book for learning current C?

Re: Master C++ Programming with Open-Source Books

#47

I have some C programming experience and I wanted to learn C++ so I bought and started reading Stoustrop's book, thinking it's the K&R of C++. It's the worst programming book I have ever read! It's introduction made me hate C++ and if I didn't had to work with other C++ libraries, I would have avoided C++. The text is full of bloat, for the lack of better word. It's the opposite of crisp writing. I read some good lan…

That book works well as a reference, as a supplement to the C++ Primer, 5th Edition.

Not to be confused with C++ Primer Plus.

Re: Master C++ Programming with Open-Source Books

#48
post #38

Earlier quoted context omitted.

Make the language easy to use without any mental burden? But you do realize programming is not easy, especially when you're aiming for high performance. How can you make a language easy to use "without any mental burden"? Programming is hard, programming well and with performance in mind is even more so. Some things you just can't magically make easy.

You can program with "performance in mind" in C and the big difference will be that the problem itself will be the obstruction, not the language. In C++, you fight with the language first and then face the problem.

What fight are you having with C++?

Re: Master C++ Programming with Open-Source Books

#49

Can you ever really master C++? I've been at it more than 20 years and I'm still delighted to learn new things about the language and the library.

I've been at it more than 20 years and I'm still delighted to learn new things about the language and the library.

And it's under active revision and improvement. There are great new things to learn every few years.

Re: Master C++ Programming with Open-Source Books

#50

Would someone care to ELI5 the differences in functionality between C, C+, C++, and C#?

C - Compiled language, imperative, pretty basic constructs (no OO, no GC), basically portable Assembly

C+ - No idea.

C++ - C with a bunch of stuff added on (mainly OO, other goodies too). Still no GC.

C# - not related to C at all. It's basically Microsoft's Java, with GC, OO, higher level constructs, lots of sugar, etc...

Post reply on HN