+ 2
Is it easier to learn C++ after learning Python?
Hello! I'm learning Python. So far, I am finding this language pretty easy to follow and understand. I will eventually need to learn C++ for graduate school. I've dabbled a bit on SoloLearn to try C++. On one hand, I am not finding the C++ language as intuitive, but on the other hand, I feel having exposure to Python helps me. Does anyone else feel the same way? Does learning Python make learning other languages easier, or do you think it makes no difference? Thank you!
9 Antworten
+ 11
[Part 1 of 2]
Marina First... I'm glad to see a fellow Econ major learning to program, albeit, my B.A. was completed way back in 1998. 😉
While I can't answer this question from the perspective of having learned Python first, then C++, I did learn Visual Basic for Applications (VBA) before learning C++ back in 1996.
Even though Python was still a fledgling language at the time, I hadn't heard of it. I do think VBA was a similar equivalent to what Python is today from a learning perspective.
In that vein, I personally struggled learning with the now defunct Turbo C++ and felt the strong desire to revert back to my comfort zone with the language I was familiar with.
C++ is in a much better state today with a wealth of great learning resources and fantastic IDEs with productivity features that will make learning much easier today.
My advice is to anticipate a learning curve, but don't allow yourself to get discouraged.
(continued...)
+ 11
[Part 2 of 2]
While there are many common imperative programming control flow and looping concepts between both and most languages, be prepared to learn a lot of new concepts as well as different ways of doing things.
My advice is to not fall into the trap of thinking the "Python way" is the "better way" simply because it's what you learned first or are more familiar with.
Remain open minded as you learn C++ or any other language for that matter.
It's fine to be critical about language design differences and such. Just reserve judgment until you've first become familiar with a few different languages at least.
Hopefully, this helps paint a clearer picture.
+ 8
One thing you need to be wary of in C++ is that you are responsible for your own dynamic memory management (allocation and deallocation) as there is no automatic garbage collection. Pointers that store the addresses of other variables are another concept that often confuses beginners.
+ 7
If Python was the first language you learnt then the introduction to programming concepts such as program flow, loops, data structures etc. that you received while learning it will make the journey of learning C++ easier.
On the other hand, Python and C++ have rather different syntax and style, so Python would not be helpful for C++ here and you would have been better off learning something like C first.
+ 5
Marina Scarth much of what Arturop stated is true as there are more things to directly deal with including brackets, punctuation, code structure, and other notable differences.
Thanks and happy coding
https://www.sololearn.com/discuss/1539559/?ref=app
https://www.sololearn.com/discuss/2044557/?ref=app
https://www.sololearn.com/discuss/1185783/?ref=app
https://www.sololearn.com/discuss/127812/?ref=app
https://www.sololearn.com/discuss/854090/?ref=app
https://www.sololearn.com/discuss/865381/?ref=app
https://www.sololearn.com/discuss/1325592/?ref=app
https://www.sololearn.com/discuss/115566/?ref=app
https://www.sololearn.com/discuss/1798852/?ref=app
+ 3
Yes and no.
+ 2
Im used to ending my statments with semicolon and use curly braces for codeblocks. I never used python before but im confident I can learn it. But i may have heard that C and C++ dealing with pointers and such is lot more harder to grasp when u started with Python. Im not sure im a newbie too. Its just my opinion can change no worries.
+ 2
Yeah if you think that c++ is easier than python then phon is hard for you than c++ if you think all are easier then all languages must be easier for you
+ 1
Hi Sonic, would you like to elaborate? Thanks!