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.
Just to make it clear. The original poster is trying to learn C++ and knows basic C. He also claims that he finds C++ complicated. By doing an over simplification like C++ is just an C with OOP features motivates him to learn and focuson the points it differs from C.
Also in the broader sense Namespaces is a way to group and organize Classes and and Objects.
Certainly C++ is a powerfull and full featured language but this not what we discuss here.
PS For the history
1)Also Borland took this approach when introduced C++
2)X11 windows is a classical example of C code written to give a feeling of using C++
- 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…
I'd like to recommend Jean Parents talks: https://www.youtube.com/watch?v=QGcVXgEVMJg&list=PLiWEEi8ezR... They are truly great.
- 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…
Abseil C++ Tips of the Week are also really good: https://abseil.io/tips/
Would not recommend Principles and Practice Using C++, it is a fluff loaded book seemingly made to sell to university students.
I think it's a great introduction to Programming, but if you already know some other language, it tends to be verbose - but Stroustrup always tends to be verbose. I, for one, really like his style.
I used to like Bjarne's style when I was just starting, but nowadays it seems way too verbose. Even talks, you can "compress" his 1+ hour talks to 15 minutes, lossless :)
> 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.
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.
It is not an inferiority complex, rather to stop people learning about writing bad code, open to security exploits by default, something that C is pretty good at.
> 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.
You haven't addressed my (implied) question,though. I don't think that the average Perl programmer is an order of magnitude more productive than the average Python programmer.
Rust is the first language I've seen that even has a chance though.
Yup. D had a shot, but they screwed it up with (effectively) mandatory garbage collection. Ada also had a shot, I think, but they screwed it up with no C compatibility and expensive SDKs - or something. For some reason, Ada is just not perceived as "cool". It actually seems like a pretty good language!
Use it. Not being a smart@$$ here. Any language you want to learn will only become natural when you've used it for a significant project or set of exercises. Either clone or port something non trivial, or use it for your latest pet project, or get permission to use it at work.
I'd still argue that there's a lot of value in some form of teaching (via book or video or whatever). If left to their own devices, novices will often come up with messy, non-idiomatic ways to do things.
Yeah, the trick in my opinion is to find a good enough book or guide on new features with which you can skim and familiarize yourself. If you don't understand when you might apply something, go figure that part out. Then work on a project and when it seems like you might need that concept, go read about it in more detail. In terms of real world work, having a very broad, surface level knowledge of many concepts and when you might apply them often comes in more useful than a very in depth knowledge of a few specific concepts.
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.
I would love a book similar to C# In Depth but for C++. The book takes you on an evolutionary tour of C#s features, version-by-version. One of my favorite programming books of all time and a good read even for someone who doesn't program in C#.