I wish there was a good place to learn “the other parts” of C++, the build systems, using static analyzers, testing, dependency management, etc. I’m thinking something like MIT’s “missing semester” course which teaches the boots on the ground part of software like how to use Git. https://missing.csail.mit.edu/ Maybe these resources exist for C++ and I just never found them. I think a lot of “modern” languages get thi…
LearnCPP: Website devoted to teaching you how to program in C++
61–70 of 145 posts
Re: LearnCPP: Website devoted to teaching you how to program in C++
#62I don't even know what I would recommend to a newbie. I learned C 25 years ago, and dabbled in C++ 2 or 3 times since then.
Bjarne's books might be great, but they aren't for anyone new to C++ and especially not anyone new to programming in general. C++ For Dummies/21 Days style books are just bad. And there are more bad websites than I can count.
Re: LearnCPP: Website devoted to teaching you how to program in C++
#63C++ is huge and growing every 3? years (C++17, 20, 23...) is it really possible to master or can you only ever get to the point of being good enough to be dangerous?
There was an old joke about everyone using a different subset of C++ but like most jokes it's mostly an over exaggeration.
C++ (and C) have amazing backwards compatibility and there is a strong chance that code written 30 years ago will still compile, link, and run as long as the dependencies haven't also changed too much (I'm looking at you Win32, X11, Motif). That gives you the time to migrate code bases over time without the fear of being left behind and unsupported.
Even if, for some reason, you were writing C++98 for the last 30 years, it shouldn't be too difficult to make the jump to newer standards. The biggest change, in my opinion, is lambdas and move semantics, and it's not to difficult to apply those to an old code base (if you want to) and start modernizing it. Some people say C++20/23 is a new language but the fundamentals of C++ haven't changed too much and I'd say it's easier to learn C++23 coming from C++98 than it is to learn Rust coming from C++98.
Re: LearnCPP: Website devoted to teaching you how to program in C++
#64I wish there was a good place to learn “the other parts” of C++, the build systems, using static analyzers, testing, dependency management, etc. I’m thinking something like MIT’s “missing semester” course which teaches the boots on the ground part of software like how to use Git. https://missing.csail.mit.edu/ Maybe these resources exist for C++ and I just never found them. I think a lot of “modern” languages get thi…
This is a good idea. Most modern languages have their own build tool which handle most of these things, so this requires some separate learning with C++. Some ideas for a curriculum: Context - C++ as a standard, compilers as implementations - a build tool's role in handling compilation and linking - compilers having limited abilities, having limited warnings and analysis by default Build tools - evolution: e.g. make…
Sure it is easier for simple projects, but C++ is not for simple projects.
Re: LearnCPP: Website devoted to teaching you how to program in C++
#65I wish there was a good place to learn “the other parts” of C++, the build systems, using static analyzers, testing, dependency management, etc. I’m thinking something like MIT’s “missing semester” course which teaches the boots on the ground part of software like how to use Git. https://missing.csail.mit.edu/ Maybe these resources exist for C++ and I just never found them. I think a lot of “modern” languages get thi…
This is a good idea. Most modern languages have their own build tool which handle most of these things, so this requires some separate learning with C++. Some ideas for a curriculum: Context - C++ as a standard, compilers as implementations - a build tool's role in handling compilation and linking - compilers having limited abilities, having limited warnings and analysis by default Build tools - evolution: e.g. make…
Re: LearnCPP: Website devoted to teaching you how to program in C++
#66As a newbie into programming, I get pulled all the time by people to learn my first compiled language either in C++ or Rust. Every time I ask even the most innocent question in any forum it becomes a shitshow, and I can see, I'm late to the party here in HN.
Re: LearnCPP: Website devoted to teaching you how to program in C++
#67The website sometimes fudges things with somewhat-incorrect statements. Maybe it's a minor issue, but I noticed that it says, for example: > When an initializer is provided after an equals sign, this is called copy > initialization. Copy initialization was inherited from the C language. > > int width = 5; // copy initialization of value 5 into variable width > That's not quite right. Consider the following program: #…
Copy initialization does not mean that the copy constructor is called. It is the correct term for an expression `T a = ...;`, which can often result in the copy constructor being called but does not have to. In this case it's mandatory copy elision from a prvalue, which leads to only one constructor being called.
https://en.cppreference.com/w/cpp/language/copy_initializati...
So I half-take-back my comment.
Re: LearnCPP: Website devoted to teaching you how to program in C++
#68Earlier quoted context omitted.
Sorry, but Rust is doomed to be forever solely used for meme startups and nth rewriting of basic UNIX utilities.
Similarly, sorry, but C++ is doomed to be forever solely used for (a) maintaining codebases that noone wants to maintain but doesn't have a choice, and (b) organising cpp conferences to maintain self-confidence of a crowd of programmers whose skill set is becoming more and more outdated. /s /s
Re: LearnCPP: Website devoted to teaching you how to program in C++
#69Re: LearnCPP: Website devoted to teaching you how to program in C++
#70Earlier quoted context omitted.
For Java'eans, here's an interesting StackOverflow question about why there's no Garbage Collector in C++ and what it means: https://stackoverflow.com/q/147130/1593077 and my particular answer: https://stackoverflow.com/a/48046118/1593077 in essence, with Modern C++, it is relatively easy to just not produce garbage which needs to be collected :-)
I've been getting back into C++ after an extremely long hiatus and I've been impressed by how thoroughly modern it is. The worst crime you're likely to commit these days is accidentally invoking a copy constructor more often than you want to, and even then, not actually creating leaks. In fact, the most striking thing coming from a language like Java or C# isn't memory management at all, is how utterly non-OO C++ act…
You could definitely (?) implement a Java-like container framework, with class like Iterable or IEnumerable and almsot every OO bell and whistle - if you wanted to. But it would not be very useful.