3 ms·
Python won because of its C interface was easy, so it's got Numpy, Scipy, Pytorch, OpenCV bindings, etc. For these use cases, the speed of the interpreter is mo
by nine_k 2y ago
Python won because of its C interface was easy, so it's got Numpy, Scipy, Pytorch, OpenCV bindings, etc. For these use cases, the speed of the interpreter is mostly irrelevant.
On the web dev front, Python was lucky to get easy bolted-on async I/O (via greenlets), so it was more performant than Ruby (which was really slow 10 years ago), and Django was less magical than RoR.
- em-bee 2y agopike's C interface also looks very good. pike had built-in async I/O from the very beginning. the roxen webserver is built on async I/O. it doesn't fork, and on an overloaded system it is one of the last services standing because of that. python likely caught up and overtook pike because it had better community support. one downside of pike is that it is slow to start, making it less convenient for quick scripts, which python was a lot better at, so python was more likely to replace perl in sysadmin work where short scripts matter more further helping its popularity.
- yobbo 2y agoNo, python had already won by the time django and numpy started. Pike's C interface is better in most ways, but of course that might depend on tastes. Python's easy syntax, accessible documentation, books and tutorials make the learning experience completely different. It's an excellent choice for low-effort small scripts and short-lived projects. It became widespread. At some point it started to be the chosen language in schools. Numpy and django (etc) followed from that. Pike with modernised syntax (something like Swift?) could have been a contender web-language maybe 2005-2006 at the latest. Pike's learning experience was always less welcoming. The module tree reference is great though.
- mananaysiempre 2y agoCompared to its closest once-competitors—Lua and Tcl—I’d say CPython’s C API is the worst of the bunch, ergonomically speaking. (Can’t say anything about Perl.)