Live data from Hacker News

LearnCPP: Website devoted to teaching you how to program in C++

learncpp.com

141–145 of 145 posts

Re: LearnCPP: Website devoted to teaching you how to program in C++

#141

[flagged]

Statements like these only serve to polarize people, not encourage them to write safer code / use safer languages. There are many places where C/C++ (and many other non-Rust languages) are still used, and where it would not be feasible at this time to fully rewrite them in rust. Modern resources like the OP posted should be encouraged, as they actively teach about proper use of the language, and foot-guns to avoid (e…

Proper use of the language is what https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines is for. Before that, there were HICPP, JSF, MISRA, ISO/IEC TR 24772, NUREG 6463 etc.

I have been writing in C++ for most of my professional career, I wrote company-wide guidelines, I still teach and consult. I absolutely agree that C++ is not going anywhere anytime soon. That being said, so is smoking. We can't just tell people not to smoke anymore, we live in a free society. But we really shouldn't drag more people in.

Re: LearnCPP: Website devoted to teaching you how to program in C++

#142
post #29

[flagged]

Sorry, but Rust is doomed to be forever solely used for meme startups and nth rewriting of basic UNIX utilities.

Rust is essentially C++ done right. It isn't as aggravating as C++ but it is the same technology essentially. It doesn't bring anything new to the table. It's yet another LLVM frontend.

We need to look into something far more fascinating like http://www.spiral.net/ Something that creates value a mere compiler, which is a technology from the 50s, can not.

Re: LearnCPP: Website devoted to teaching you how to program in C++

#143

[flagged]

Why do you think C++ is like smoking?

Because we live in a free society and smoking is a proper right. It is unhealthy and largely outdated habit but if you want to light a cigarette, you can.

Programming in C++ is also an outdated habit. There are better languages, better technologies, and there are generally better ways to create software than writing code, compiling the code, replacing std::abs with abs (real issue, these are different functions) and recompiling the code again. But writing in a horrible language is a proper right as well. People write in Brainfuck for fun and good for them!

Jack Rusher sums up what better programming looks like in his Strange Loop talk https://www.youtube.com/watch?v=8Ab3ArE8W3s

Re: LearnCPP: Website devoted to teaching you how to program in C++

#144
post #138

Earlier quoted context omitted.

Sorry I wasn't clear. I was responsible for the dependency that another team was using as a plugin. They weren't going to switch to conan, and our code was already using Conan for itself and its dependencies. They wanted to bring us in as a submodule, and that was just never going to work. I think what I'm pulling out of this thread is that c++ package management is so fragmented, there isn't really a safe choice to…

Oh okay - I think in that case it's possible Hunter would solve your problems. If you rewrite your library to use Hunter, then when it gets pulled in with add_subdirectory(), it should just build and get it's dependencies with Hunter - all from within CMake itself. No external tool necessary (the Hunter functions are defined in the project root `.cmake` file) I don't see any reason that wouldn't work - but.. you'd ha…

Thanks! That looks like it might be fine. The conan cache works the same way but all our builds and deployments are containerized so the ~/.conan wasn't the issue, it was that conan was in control, not cmake.

Re: LearnCPP: Website devoted to teaching you how to program in C++

#145
post #98
post #48

Earlier quoted context omitted.

I switched from C++ to Java too. Still, every time I type `new MyObject()` without a corresponding `delete` I feel like I got away with some sort of crime ;)

in c++ you probably never want to write 'new MyObject()' at all. perhaps you didn't learn c++ from a good book?

Depends more on when you learned C++. C++11 didn’t immediately replace C++98…
Post reply on HN