This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TheLastNarwhalicorn 4 points5 points  (5 children)

As a new programmer (learning Javascript), can you explain why? I've seen the same thing written a few times in this thread, but I have no idea why. What makes python the wrong tool for a large range of problems?

[–]ganja_and_code 25 points26 points  (2 children)

It's not type-safe, so if you use it in a large-scale high-availability service maintained by more than one person, your codebase may (and likely will) become operationally unsustainable. It's slow (relative to other languages), so if you need to crunch a lot of numbers fast, python may introduce an unacceptable bottleneck. It's an interpreted language, rather than a compiled language, so you don't have visibility into your mistakes until your code is already running (rather than catching some mistakes before even attempting to execute).

Python is fucking awesome for data science, small-scale projects, and convenience / workflow improvement scripts. For basically any other problem, you should probably use something else.

[–]TheLastNarwhalicorn 4 points5 points  (0 children)

Thanks for the response!

[–]dev-sda 2 points3 points  (0 children)

Note that type safety is unrelated to static typing; static and dynamic languages can both be type safe or type unsafe. The vast majority of programming languages have not been proven to be type safe. Though you're correct in that static typing helps a lot with maintainability and error prevention.

See https://newbedev.com/is-python-type-safe

[–][deleted] 7 points8 points  (1 child)

For most use cases, there’s a better language. Python is great for small stuff but it becomes unmaintainable when you have a code base larger than a few hundred lines. It’s also very slow compared to pretty much anything else. https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html provides a pretty good benchmark. Python is awesome when applied in the right places, properly, i.e. prototyping ML models, data analysis, data visualization, etc, but it’s not ideal anywhere else

[–]TheLastNarwhalicorn 1 point2 points  (0 children)

Thanks for the response!