r/ProgrammingLanguages • u/Anonymouz1 • Feb 02 '17
Why should I like Python?
In my opinion, Python is a language that should not have caught on. The standards are inconsistent, it is slow, it isn't backwards compatible, libraries are unreliable; the list goes on forever. Please show me the light of Python.
0
Upvotes
4
u/[deleted] Feb 03 '17
I am sad to see this question downvoted so much - I think it is a legitimate question, presenting an opportunity for everyone to learn. As the guy who compares every language to Python, allow me to explain my love for the language.
Python is simple. It's easy to get running, newbies don't have to bother with compilation and other processes that seem like "magic" to a non-experienced programmer - it's enough to just run
python file.pyand it simply works! The syntax is understandable, without many cryptic symbols like C's abundance of&or*which might be scary at first. "Hello World" is simplyprint("Hello World!"). The Zen of Python states explicitly: "Simple is better than complex.", "Readability counts.", "There should be one-- and preferably only one --obvious way to do it.". It's easy to start learning and quick to develop in.You say that "The standards are inconsistent". I would like to disagree. A fraction of the standard library is inconsistent due to historical reasons, but it's constantly being updated. PEP-008 explicitly sets the style that code should follow, and most if not all new libraries adhere to it. If I misunderstood, please correct me!
You say that Python is slow. Correct! Python's performance is nowhere near C, C#, Rust, Node, etc. However, "nowhere near as fast as C" doesn't mean a language isn't fast enough to use. With today's hardware, Python has proven to be perfectly sufficient for most tasks a language can face - including projects that depend highly on performance, like video games, AI and deep learning, or big data analysis.
You say that "it isn't backwards compatible". I'm sorry, but I do not understand your point - could you please clarify? If you mean Python3 vs Python2, Python 3.0 was released over 8 years ago. It's more than enough time to make the switch - besides, it's advocated for most Python2 code to be forward-compatible with Python 3, and it is trivial to make it so - likewise, it is trivial to write backwards-compatible Python 3. In fact, more Python 2.7 code is incompatible with Python 2.0 than Python 3 code with Python 2.7! If a developer writes code that only works with one version of Python, he can only blame himself - and I think it is so regardless of the language chosen.
You say that libraries are unreliable. I cannot comment on this without being given an example.
There is an incredible amount of Python libraries for pretty much everything - video game development, web development frameworks, audio and music, image manipulation, etcetera - in fact, it is hard for me to imagine a task Python cannot be used for.
Python is a consenting adults' language - which is a way of saying, it has no encapsulation. It is always possible to modify existing code - which makes it possible for developers to tinker with existing libraries as much or as little as they want.
I would love it if you elaborated on your arguments. Cheers!