3 ms·
This is a slow process which takes many years, or even decades. And what language is really the alternative? There is no clear answer. Many languages might som
by albertzeyer 4y ago
This is a slow process which takes many years, or even decades.
And what language is really the alternative? There is no clear answer. Many languages might somewhat be ok but I'm not sure. Python has grown so much because:
- It's very simple.
- Its syntax almost reflects algorithmic pseudo code.
- It's a managed language with garbage collection, you will usually not see segfaults or other memory corruption, and also not the simple kind of memleaks.
- Debugging is easy.
Those are features which are really nice for newcomers from other scientific fields, but also for professionals when Python is just the gluing language which orchestrates some heavy workers, e.g. TensorFlow or PyTorch. Or when it's just used as a better shell scripting language.
I'm myself using Python mostly for machine learning (TensorFlow, PyTorch), and as a shell script language alternative, and for other small utilities. And I really don't know what alternative language there is, which would be a better fit for this, even ignoring the state of the tooling and library support.
Some people might say Julia. But Julia is more complicated and more difficult to understand, esp for newcomers. And Julia has slow startup times. Slow startup times already disqualifies Julia for these applications, or at least it's a very huge disadvantage.
- pjmlp 4y agoIt appears simple on the surface, it is as complex as Common Lisp or C++, when one starts exploring the language surface, runtime capabilities, and standard library.
- mrtranscendence 4y agoAs an experienced Python programmer who has dabbled in C++ (and Rust), I find this claim very dubious, though I can't say either way about Common Lisp. The difficult parts of Python-the-language (e.g. metaclasses) are both fairly easily to explain and also so rarely used even by library authors that explanation isn't usually necessary. I suppose the standard library can be considered complex, but is hardly worse than C++. I've seen plenty of non-programmers become proficient enough in Python to be productive, but maybe one guy -- a statistician maintaining R libraries -- learn enough C++ to be dangerous.
- pjmlp 4y agoHow much would you score on a Python pub quiz, including all versions of Python between 1.6 and 3.10? Questions would include changes across minor versions, meta programming, old and new classes, ABC, slots, magical methods, async, standard library, famous libraries like stackless, ...
- mrtranscendence 4y agoOutside of tiny niches the world is on Python 3 now, so I don't think older versions are particularly relevant when evaluating how complex Python is. For that reason old vs new style classes don't cause issues. Nor do the existence of niche implementations like Stackless, unless we want to also claim such implementations as sources of complexity for C++ or (especially) Common Lisp, at which point it's a wash. Having trained many newly-graduated data scientists and engineers to a level of being reasonably productive in Python, my assessment is that it is simply not that difficult to get a handle on. But if I'm expected to take non-career-programmers to comparable C++ fluency, that would be a considerably longer process. Things they'd have to worry about in C++ that they don't have to worry about in Python: memory leaks, memory debugging, complex templates, libraries written in the lowest-level way possible, move semantics, ...