3 ms·
> All the performance critical code is implemented in C. Isn't this why people like python? Just glue together some libraries that someone else has written an
by mattlondon 6y ago
> All the performance critical code is implemented in C.
Isn't this why people like python?
Just glue together some libraries that someone else has written and then you write a viral blog/twitter post about your <insert trendy thing> that you wrote in just 10 lines of code?
Seriously is 't this the main reason people use it? I.e. it has a big library of stuff so it is easy for beginners and/or non-programmers to use?
I'm struggling to think of any other reasons to deliberately pick python to start something new in, although it is at least a bit more same now with types.
- stingraycharles 6y agoAll the reasons you list are indeed reasons to use Python, but none of them require performance critical code to be written in C.
- melenaboija 6y agoIn my professional environment we use python because of the cost, definitely not because we want to post it anywhere. And this is not an opinion on how companies measure cost or how one language is better than another but maybe trying to explain, and I think underestimate, popularity of Python needs a little bit more insight.
- jefftk 6y agoPython is an extremely expressive language, that lets you prototype and experiment very rapidly. In many cases, with some cleanups, refactorings, and calls to C modules like numpy, you can convert those prototypes into sufficiently performant real implementations. Here's a recent write-up of mine where almost all of the time is spent in C extensions but where it was much faster to develop and code in python: https://www.jefftk.com/p/sharding-the-brigade https://www.jefftk.com/p/sharding-the-brigade
- HelloNurse 6y agoThe important technical question is how good a Redis replacement can be built with 250 lines of Python "glue code". If performance is good enough, where are robustness and features? How large are the effort gap and the quality gap compared to the original Redis?