5 ms·
Python is great for small scripts or explorations. You can't use it for anything serious that needs to scale due to the lack of concurrency and significant memo
by juanbyrge 4y ago
Python is great for small scripts or explorations. You can't use it for anything serious that needs to scale due to the lack of concurrency and significant memory overhead. If you need something to scale you use something like C++, Java, Go, Rust, etc.
- tomnipotent 4y agoYet it's good enough to scale Pinterest, Instagram, and Youtube.
- cabalamat 4y ago> Python is great for small scripts or explorations. I've used Python on program with >30000 LOC without any problems.
- VectorLock 4y agoTypically large code bases have problems that are more intrinsic to organization than what language its in. Huge code cases in any language are usually fine if discipline is exercised. And concurrency issues and memory overhead problem are from not knowing the right way to do it. Although I will concede that naive approach to both of those is sub-optimal.
- cwalv 4y ago> Although I will concede that naive approach to both of those is sub-optimal. Paradoxically, this can actually lead to a better understanding of how to write performant code. When I first learned some of the be implementation details of python, I couldn't believe it was performant enough to work for anything ... after optimizing enough of it, I understand better what actually matters
- VectorLock 4y agoAlso people seem to forget the rule of premature optimization. Worry about performance when performance starts to be a problem. You identify the area with performance is lacking and optimize that. Compute is cheap, manpower is expensive.
- LudwigNagasena 4y agoDo you really have no problems? I find the lack of proper type support and proper variable scoping to be a huge issue.
- ReflectedImage 4y agoLack of typing support is a major advantage. If you don't have types you don't need interfaces, generics, etc. The resulting code is shorter and less bug prone.
- LudwigNagasena 4y agoYou still need all of that. You just have to store that information in documentation and do analysis in your head instead of relying on a static analyzer.
- ReflectedImage 4y agoNo, you really don't. Static typing is very complex and error prone compared to dynamic typing. There is a lot less stuff that needs remembering.
- rjh29 4y agoLanguages like Python and TypeScript support 'any' as a type, so you can always opt out of strong typing if you want. Most of the time generics are preferable to things randomly dying at runtime though.
- ReflectedImage 4y agoThings don't die very often due to typing issues. The unit tests always pick up typing problems. Testing the code's behavior implies testing the code's typing. And if you are not testing the code's behavior then the code isn't really tested at all.
- rjh29 4y ago
- ActorNightly 4y ago>You can't use it for anything serious that needs to scale due to the lack of concurrency and significant memory overhead. Please actually think about what you are saying instead of just parroting off stuff you read on blogs. Python has concurrency. Its called multiprocessing. Of course, there is startup overhead, but it achieves the same functionality. Furthermore, processes that are most commonly threaded (like fanning out network requests) are well suited to async, which has less overhead than threads. Also, memory considerations are relevant only for embedded systems, for which you would never use Python. Memory is dirt cheap these days.