Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python for C++ Developers [closed]

Tags:

c++

python

I'm a long time C++/Java developer trying to get into Python and am looking for the stereotypical "Python for C++ Developers" article, but coming up blank. I've seen these sort of things for C#, Java, etc, and they're incredibly useful for getting up to speed on language features and noteworthy differences. Anyone have any references?

As a secondary bonus question, what open source Python program would you suggest looking at for clean design, commenting, and use of the language as a point of reference for study?

Thanks in advance.

like image 611
Stefan Mai Avatar asked Nov 30 '08 07:11

Stefan Mai


People also ask

Is C close to Python?

The main difference between C and Python is that, C is a structure oriented programming language while Python is an object oriented programming language. In general, C is used for developing hardware operable applications, and python is used as a general purpose programming language.

Is Python still relevant 2022?

Python ranked first among Stack Overflow's “most wanted” languages for 2021. It is the third most popular technology, according to the same developers' survey. As of May 2022, it is no. 1 in the TIOBE Index.

Can I learn python after C?

Yes its definitely ok. Infact you'll probably learn python much faster since you know C. It's like playing level 2 of a game and then going back and playing the first level.

Is Python losing popularity?

As you can see in the chart above, demand for every top language dropped significantly from 2020 to 2021. Python was the only popular programming language to only see a small dip falling from around 74,000 jobs to 70,500.


2 Answers

I never really understood the "Language X for Language Y developers" approach. When I go looking to learn Language X I want to learn how to program in it the way that Language X programmers do, not the way Language Y programmers do. I want to learn the features, idioms, etc. that are unique to the language that I am learning. I want to be able to take advantage of the things that make the language special and use that knowledge to expand my ways of thinking and solving problems. I don't think I would get the same sort of insights from a tutorial that was framed in the context of another language. If you can learn your first language without a tutorial geared towards something you already know you should be able to pick up a second language the same way (and in my experience, the more languages you know the easier it is to learn new ones).

With that said, I would recommend The Python Tutorial as a good, quick, and easy way to get going with Python and Dive Into Python as a more complete introduction, also available for free here. I would also agree with what others have said regarding looking at the code for the standard libraries as a source of good examples and design practices, the standard python libraries are pretty clean and easy to read.

like image 146
Robert Gamble Avatar answered Sep 28 '22 17:09

Robert Gamble


Dive Into Python is a Python book for experienced programmers.

like image 28
gimel Avatar answered Sep 28 '22 17:09

gimel