Live data from Hacker News

I learnt C++ in 2018 and have no regrets

vishnubharathi.codes

31–40 of 259 posts

Re: I learnt C++ in 2018 and have no regrets

#31
Many here talk about the complexity of C++. I concede it's a huge language, and not a beautiful one. However, I wouldn't call it that difficult. Being a systems language, once you understand (roughly, sans optimization finesse) how the machine code is generated it starts making a lot of sense. Maybe C++ is even educational because so many nuts and bolts are showing. Personally I'd recommend some systems programming to everyone, but if thats not on your radar at all, maybe don't bother. C is also a fine choice.

Re: I learnt C++ in 2018 and have no regrets

#32
I've learned 15+ years ago, and I stopped paying attention around ~2010, which is just before significant changes were made. Even though I read up on some features and concepts from C++11 and C++14, I feel so disconnected from what's going on as if what I learned was a completely different language.

Can anyone recommend any source for someone with lots of pre-C++11 experience to get up to speed with current capabilities, and the current community?

EDIT: Thanks everyone for the suggestions!

EDIT2: I skimmed Anthony Calandra's list, and most of the new features seem indeed just cute, but not fundamental changes. Still, I want to reiterate the worry I expressed downthread: how much did the underlying semantics, the idioms, and the general way of thinking change?

Re: I learnt C++ in 2018 and have no regrets

#35

Unless your job demanded it I can't think of a compelling reason for a Node guy to learn C++ as their go to choice of OO language. Why not Java? Even Python is a good gateway to OO for folks coming straight form Node background.

If you want to do systems programming then you need to learn c,c++,rust, maybe go. I mainly write Java/Kotlin and learning C++ and Rust have really helped me learn things about computers that Java hides.

Re: I learnt C++ in 2018 and have no regrets

#36

What's there to regret? For purely edification purposes, there isn't a better OOP language ( though it encompasses other paradigms as well and isn't purely OOP ) since it doesn't have training wheels. You could hurt yourself with it but it certainly allows you to explore and learn. Also, you could "learn" it in a year, but it takes you a lifetime to master it.

It also takes you a lot closer to learning C. Some of it doesn't directly carry over, and may even be deceptively similar without being the same, but for programmers coming from more modern languages, many of the big novelties in C and C++ are the same:

- Manual memory management and direct use of pointers.

- Emphasis on giving as much latitude as possible to compiler writers so they can generate fast code on obscure architectures.

- Separation of header files from object files.

- Explicit handling of object files and linking in the build process.

In fact, I think after learning C++ you should be able to read almost any C code with no issue, which is nice for being able to peek under the hood of the infrastructure we rely on every day.

Re: I learnt C++ in 2018 and have no regrets

#37
I also used 2018 to learn and get proficient in C++.

Honestly, I don’t really like it. The only real reason for that is that using smart pointers is verbose, but I don’t want to do manual memory management where it’s possible to instead rely on RAII.

Ironically enough, though, C++ is probably the second of two languages I’d consider my “go to.”

Re: I learnt C++ in 2018 and have no regrets

#38

Unless your job demanded it I can't think of a compelling reason for a Node guy to learn C++ as their go to choice of OO language. Why not Java? Even Python is a good gateway to OO for folks coming straight form Node background.

Then again, why would you want to choose a language based on whether it's "OO" or not? OOP is just a way of structuring code that fits well in some domains, and fails spectacularly in others[0], and that happens to invite a lot of philosophers (the same way FP invites a lot of mathematicians). It's better to think about the capabilities the tool gives you - what kind of software you can write, what kind of software that language's community writes, and how much it helps manage complexity.

--

[0] - Everything I worked on, from games through embedded to web development, was a poor fit for C++/Java-style OO, but I suspect there are some domains where OO modeling is the best way of looking at things.

Re: I learnt C++ in 2018 and have no regrets

#39

I've learned 15+ years ago, and I stopped paying attention around ~2010, which is just before significant changes were made. Even though I read up on some features and concepts from C++11 and C++14, I feel so disconnected from what's going on as if what I learned was a completely different language. Can anyone recommend any source for someone with lots of pre-C++11 experience to get up to speed with current capabilit…

Still learning myself, but this seemed really good when I came across it a year or so ago:

https://github.com/AnthonyCalandra/modern-cpp-features/blob/...

Re: I learnt C++ in 2018 and have no regrets

#40

"To round up, C++ does not dictate about its tooling, which basically gives lot of choices and flexibility. But at the same time it is making it complex for beginners to come in to projects and start projects with it." This was a big problem for me when I first started using C++. I don't remember it being too bad when I was just working on small projects and things I wanted to do at school. The problems started when…

I suspect a lot of people learn how to use some framework or library that happens to be written in C++. For me it was OpenFrameworks and Cinder during art school.

https://openframeworks.cc/

https://www.libcinder.org/

Post reply on HN