What do you guys think about python?

I heard C++ and Java was the biggest high level programming language.

Python is just newer.
I was wondering in the future like 30-50 years, do I need to learn Python?
I heard C++ and Java was the biggest high level programming language.
"Biggest"?


Things I dislike about Python:

Horrible documentation
The types that functions expect is very poorly documented, as the performance characteristics of built-in containers. For example, if you read any C++ documentation, you can know that std::vector has amortized O(n) append and O(1) lookup, while std::map has O(log n) insert, O(log n) lookup, and O(n log n) traversal.
This information is not documented for Python's lists, dictionaries, etc. It's a small thing, but it makes it so much harder to predict the behavior of a piece of code.

Dynamically typed
Python's horrible documentation is compounded with it not being statically typed. A static language can get away with lackluster documentation because function declarations convey information about the parameters (as long as the developer wasn't being cute with the types as in MakeSnafucated(object a, object b)). Even if you aren't very familiar with a statically typed codebase, you can sort of figure it out by following the types involved. Dynamic typing offers no such mercy.
To make matters worse, IDEs for dynamically typed languages are generally unhelpful because no type information exists at development time. At best you'll get autocomplete, but that's about it. You can forget about useful refactoring functionality like in C# and Java IDEs.

Version confusion
A few years ago version 3.0 of the language was released, which broke compatibility with code written for the 2.x series. To this day there's still new code being written for the 2.x series, because of how messy the transition was/is. Even if you yourself wanted to write in 3.x, you had no way of knowing if some library you might need later used 2.x.
In my opinion this debacle hurt adoption so much that Python's eventual fall to irrelevance will be traceable to it. Before 3.0 adoption was exploding; 3.0 totally killed that momentum, and now it's basically stagnating.

Horrible performance
There are alternative implementations, but it's a disgrace that after what, 15-20 years, basically no improvements have been made to the reference implementation in terms of performance. It makes the language practically unusable except to write glue code (to pass data around between libraries written in other languages). If you need to do anything even approaching non-trivial, you can expect the performance to degrade the more code you write in Python.

No threads
The way Python is designed internally means that it's impossible to run code in parallel. Oh, the standard library does have a thread object that (IIRC) maps to system threads, but the interpreter will still lock the threads so that at most only one of them is running at any time. While computer architectures have been steadily moving towards more parallelism since the mid-2000s, Python has mechanisms in place that guarantee seriality.
(Yes, you can do process-level parallelism, but then you have to waste time with IPC.)


Honestly, I see no point in using Python for anything. Even for scripting/automation, I can write something in a tenth of the time in C#, simply because C# IDEs are so much better than Python IDEs. And after I write I can run it secure in the knowledge that it's not going to crash six months from now because of a type error, or a mistyped variable name.
Honestly, I see no point in using Python for anything

Python might be useful to write plugins for Gimp or Inkscape or macros for LibreOffice/OpenOffice
Well, I was referring to standalone projects. Obviously if you need to interface with other code and you need to use Python to do it, you should use Python. Personally, I would consider the alternatives first, if there are any.
This won't be as detailed of a response as helios's, but in my opinion, you can't really plan ahead 30-50 years in the future. You shouldn't make any long-term goal dependent on whether or not you know Python, or any other single high-level language for that matter. No one has any clue what technology will look like in 30-50 years; languages rise and fall, but the knowledge of how to think logically, and the ability to plan designs and features to be robust, will still most likely be valuable skills. In other words, a lot of skills learned during programming can apply to both Python and C++.

A versatile programmer should have a good grasp of multiple languages under his belt. Perhaps throw in a functional programming language in there too, like Lisp. This doesn't mean you need to know them inside out, but I would practice writing some programs with at least three languages.

PS: I've mentioned this before, but I too sometimes use C# for "scripting", as helios does.
closed account (E0p9LyTq)
I was wondering in the future like 30-50 years, do I need to learn Python?

Look at what the computer where the computer industry was 30-50 years ago.
1972 C was created, 1978 C++. 1991 for Java.

In 1976 the first pre-built Apple IIs were sold, before then it was a computer for hobbyists to assemble.

1981 IBM released the IBM PC, arguably the first home computer that wasn't just for computer nerds.

Given the changes seen for hardware and software over the past 30-50 years, trying to predict what tech from now will last is a fool's errand.

Software is very much driven by what hardware tech is available.
Last edited on
In 1976 the first pre-built Apple IIs were sold, before then it was a computer for hobbyists to assemble.

1981 IBM released the IBM PC, arguably the first home computer that wasn't just for computer nerds.
To my knowledge, although I'm no expert on Apple hardware, the Apple ][ was never (or at least not primarily) sold as a kit, only assembled. Quoting Wikipedia, "the Apple II marks Apple's first launch of a personal computer aimed at a consumer market – branded towards American households rather than businessmen or computer hobbyists."
The IBM PC on the other hand was marketed primarily to the business market and secondarily to the home market.
I'm not any kind of python programmer, but it does make some things very easy. For all its issues (and every programming language has things its really not suited for), it's one tool amongst many, and when it's a great tool for the job, it's silly not to consider using it.

I was sold on it when it turned out it came with SimpleHTTPServer in its library; a one-line python command to create a simple HTTP server on any machine with Python installed. It just made the job of making files easily available across a network suddenly so simple. Got Python installed? Great, job done. It just made that task so easy, so I went looking to see what else it made so easy.
Topic archived. No new replies allowed.