4 ms·
The ones saying they will never use Python because it’s slow, is the probability high that their “fast” language is not thread safe?
by punnerud 2y ago
The ones saying they will never use Python because it’s slow, is the probability high that their “fast” language is not thread safe?
- IshKebab 2y agoWhat do you mean by thread safe exactly? Instead of Python I would use Typescript or Rust or possibly Go.
- continuational 2y agoPython isn't "thread safe", not even its lists are. What are you getting at?
- meindnoch 2y agoPython is not thread safe.
- Quothling 2y agoHow many teams actually decide against using Python because it's "slow"? I'll personally never really get why people prefer interpreted languages in the age of Go, but even if we go back a few years, you would just build the computation heavy parts of your Python in C. Just like you would do with your C#, your Java or whatever you use when it was required. Considering Instagram largely ran/run their back-end on Python, I'd argue that you can run whatever you want with Python. Maybe I've just lived a sheltered life, but I've never heard speed being used as a serious argument against Python. Well, maybe on silly discussions where someone really disliked Python, but anyone who actually cares about efficiency is using C.
- wongarsu 2y agoYou occasionally hear stories about teams writing something in Python, then rewriting it in another language because Python turned out to be slow. I have one such story. With the excellent Python/Rust interop there is now another great alternative to rewriting the heavy parts in C. But sometimes the performance sensitive part spans most of your program
- imtringued 2y agoPython is a lot like PHP. A uniquely bad value proposition in almost all aspects. It is a slow interpreted language, but that isn't the only argument against it. It has abandoned backwards compatiblity in the past and there are still annoying people harassing you with obsolete python versions. The language and syntax still heavily lean towards imperative/procedural code styles and things like lambdas are a third class citizen syntax wise. The strong reliance on C based extensions make CPython the only implementation that sees any usage. CPython is a pain to deploy crossplatform, because you also need to get a C compiler to compile to all platforms. The concept behind venv is another uniquely bad design decision. By default, python does the wrong thing and you have to go out of your way and learn a new tool to not mess up your system. Then there are the countless half baked community attempts to fix python problems. Half baked, because they decide to randomly stop solving one crucial aspect and this gives room for dozens of other opportunistic developers to work on another incomplete solution. It was always a mystery to me that there are people who would voluntarily subject themselves to python.
- tgv 2y ago> How many teams actually decide against using Python because it's "slow"? At least mine. Also because of the typing. It's probably improved, but I remember being very disappointed a few years ago when the bloody thing wouldn't correctly infer the type of zip(). And that's ignoring the things that'll violate the specified type when you interface with the outside world (APIs, databases). > anyone who actually cares about efficiency is using C. Python is so much slower than e.g. Go, Java, C#, etc. There's no need to use C to get a better performance. It's also very memory hungry, certainly in comparison to Go.
- neonsunset 2y agoExcept “like you would do with your C#, your Java…” does not happen w.r.t. native components - you just write faster code and in 98% situations it’s more than enough. Now, Java and C# are different between each other when it comes to reaching top end of performance (Java has better baseline, but C# can compete with C++ when optimized), but we’re talking about the level far above the performance ceiling of Go.
- deleted 2y ago[deleted]
- guenthert 2y agoMost of us use Python, just not for stuff which needs to be fast. Not sure, what you mean by thread-safe language, but one of the nice things about Java is that it made (safe) multi-threading comparatively easy.
- bschwindHN 2y agoWith Rust, code runs at native speed, multithreading is easy and safe, and the package manager doesn't suck. I will never use Python if I can help it, but not just because it's slow.