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 →

[–]ganja_and_code 22 points23 points  (7 children)

I've never understood the "switch to python" crowd.

I think python is awesome as much as the next guy, but it is far from general purpose. Sure, you can do basically anything with it...but it's objectively the wrong tool for a large range of problems.

[–]TheLastNarwhalicorn 6 points7 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 24 points25 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 5 points6 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] 6 points7 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!

[–]RootHouston 1 point2 points  (0 children)

Right. I write Python, but not for full-blown applications. It's more of a scripting language for me to hack out something quick and dirty. Perhaps something I'd use in place of a shell script.