C++ is a monster. I’d suggest C instead to learn about these basic ideas.
Comment on Java at 30: How a language designed for a failed gadget became a global powerhouse
MolecularCactus1324@lemmy.world 5 days agoI learned C++ as my first language and it was a great way to understand the core issues of a programming language — like memory allocation, memory freeing, and the difference between memory addresses and the memory contents themselves. Java obscures these nuances to a degree, but Python is too friendly and makes it hard to understand them.
I believe if you learn C++ you can easily learn any other language. After C++, I learned Python, JavaScript, and Java in a few days each without formal instruction. If you learn Python first, you’re probably going to struggle learning those other languages because you haven’t grasped the lower level concepts yet and may never if you’re not in a formal setting that forced you to learn them.
No one disagrees that Python is easier, but if your goal is to get a foundation in programming that allows you to easily pick up other languages, you should start with C++.
jenesaisquoi@feddit.org 4 days ago
MolecularCactus1324@lemmy.world 4 days ago
C++ has classes though and if you start with C and then try to go to other Object-oriented languages then you’ll be a little lost. But, by learning C++ first, you’re pretty much learning C at the same time, you just need to avoid using classes.
pycorax@lemmy.world 4 days ago
Imo people should start with C first since it is a lot simpler than C++ while still providing a lot of what you mentioned. C++ adds a lot of things like name mangling, templates, L & R value references that can quickly make things a bit more daunting for beginners.
I also generally find error messages for C a lot more parsable for beginners than C++ ones.