top 50 comments

sorted by: hot top controversial new old
[–] [S] 53 points 1 year ago (42 children)

My opinion: Python may not be the best at everything it does, but it's in the top 3-5 languages in the following areas:

  • Very easy to install, write and understand
  • Great libraries for a lot of applications
  • Large community, lots of people with experience in it

It will always be a practical choice for those reasons. There are probably a lot more as well that I can't think of at the moment.

  • source
  • hideshow 42 child comments
  • [–] 32 points 1 year ago (2 children)

    Python is not the best at anything, but is the second best at almost everything. That's the reason I use it. Everything I need to do, I know I can do it in python, maybe isn't going to be the better or faster it could be, but it will work.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 12 points 1 year ago (1 child)

    Yeah, Python is fast enough. Being assembly-fast is just not that important for a lot of things.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 4 points 1 year ago*

    This. As a chemist I just need to do rather simple calculations, plots and sometimes use a package or two. My total yearly compute time is like 1 hour in python. Spending 5 years learning c, assembly, data science and what not just to reduce that to 1 minute is not really worth it.

  • source
  • parent
  • [–] 32 points 1 year ago (13 children)

    I would add its a easy Scripting language. No compilation problem, richer that shell/bash makes it a powerfull choice.

    And a really dont like it.

  • source
  • parent
  • hideshow 13 child comments
  • [–] 11 points 1 year ago (10 children)

    It is far more then that. It is a full up programming language.

    I never understand why people think compilation is a barrier. But sure most python is not compiled.

  • source
  • parent
  • hideshow 10 child comments
  • [–] 4 points 1 year ago (3 children)

    If compilation takes more than a few single-digit seconds, IME, it breaks the development flow when you're working on small fixes.

  • source
  • parent
  • hideshow 3 child comments
  • load more comments (6 replies)
  • load more comments (1 reply)
  • [–] 14 points 1 year ago*

    The libraries part is enormous. Researchers just pull up math engines, database access is a breeze, and so on.

    You got a specific need, there is a library for it. It's like C/C++ without the hassle.

  • source
  • parent
  • load more comments (22 replies)
    [–] 22 points 1 year ago* (9 children)

    It’s kind of crazy how problematic pip is, though. There are enormous ecosystems like conda, poetry, arguably Docker all built around “pip not working right.”

    I see so many people want to install vllm or something with like a 95% crash and burn rate if they aren’t already proficient with Docker, complete with the spare disk space to basically ship a whole other machine.

    Meanwhile, massively complex Rust or Go or whatever packages… just work. With the native tooling, for me.


    To be clear, I like Python, and I believe many issues can be smoothed with time (like improving its JIT and maybe encouraging more typing in codebases). But pip and its ecosystem are forever cursed.

  • source
  • hideshow 9 child comments
  • [–] 14 points 1 year ago (2 children)

    People used to shit on npm all the time, and I believed them, because I didn't have experience with anything else.

    Then I tried pip. Holy...I had to beg npm forgiveness for ever doubting it

  • source
  • parent
  • hideshow 2 child comments
  • [–] 8 points 1 year ago

    npm was bad, for a very long time. Then they fixed it, because they actually listened to other languages and did what they did. Python still refuses to do that. It’s quite insane because Ruby has had a solution for 15+ years at this point and Python could have directly copied it but refuses to. Python is absolutely the worst language I know of in regards to tooling.

  • source
  • parent
  • [–] 9 points 1 year ago (1 child)

    pip is easily the worst thing about Python. But now that we have uv I would say the worst thing is the package/import system. I'm pretty sure only 1% of developers understand it, and it only really works properly if your Python code is a Python package.

    If you treat Python as a scripting language and just scatter loose files around your project and run them directly, it doesn't work at all. Pain everywhere. Which is dumb as fuck because that's like 80% of how people use Python.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 1 year ago*

    Ugh yes I hate the import system too. I have to look it up every time and still don’t understand it, and it’s a hair away from messing up existing projects to the point where sometimes it does.

    I want to love uv, but:

    • It breaks some random compiled C packages. I ran into this the other day, and the associated issue on the package was basically “shrug we see it’s breaking, this dev is doing some weird shit”

    • I’d prefer to use the optimized/patched build of Python CachyOS provides (and the optimized Python compiled system packages), though this is largely OCD.

    • It’s not optimal for some PyTorch stuff, which is its own little ecosystem nightmare

  • source
  • parent
  • [–] 3 points 1 year ago (1 child)

    I'm glad it's not just me lol every so often I'll think "I haven't done a python project in a while I'll try FastAPI" or something and I have so many issues just getting the env set up.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 1 year ago*

    It's so ridiculous that many projects don't even support pip+venv (much less system python packages. shivers). They literally check if that's what you're trying and pre-emptively fail.

    Some projects become impossible to run in any combination because some dependency (looking at you, sentencepiece) no longer works outside a narrow set of circumstances, unless you hand build some obscure github PR, disable all the dependency checks and cross your fingers and hope the wheel builds.

    And I'm sorry, but I don't have 200GB of space, tons of spare RAM, and an intricate docker passthrough setup for every random python project. I just have like four different 3rd party managers (conda/mamba, uv, poetry... what's the other one? Ugh)

  • source
  • parent
  • [–] 18 points 1 year ago (4 children)

    I think it's just because it is always recommended as an "easy" language that's good for beginners.

    The only other thing it has going for it is that it has a REPL (and even that was shit until very recently), which I think is why it became popular for research.

    It doesn't have anything else going for it really.

    • It's extraordinarily slow
    • The static type hints are pretty decent if you use Pyright but good luck convincing the average Python dev to do that.
    • The tooling is awful. uv is a lifesaver there but even with uv it's a bit of a mess.
    • The package system is a mess. Most people just want to import files using a relative path, but that's pretty much impossible without horrible hacks.
    • The official documentation is surprisingly awful.
    • Implicit variable declaration is a stupid footguns.

    The actual syntax is not too bad really, but everything around it is.

  • source
  • hideshow 4 child comments
  • load more comments (4 replies)

    The blog gives a few vague answers, none of which shed any light on how Python became so popular. If I had to guess, much of it's popularity came from being embraced as a data analytics tool -- which is honestly a great use case for an interpreted scripting language -- and its subsequent adoption by academia, introducing it to an entire generation of CS grads.

    Python has advantages and drawbacks like any programming language. It's not my favorite language and it's not my least favorite. It's not going anywhere anytime soon.

  • source
  • [–] 10 points 1 year ago

    I would argue it's because it is Good Enough. The most popular solutions to things are rarely the optimum ones but the ones that are generally applicable.

    For example, I could fight with bash's unpleasant syntax or I could do it more easily (but less efficiently) with Python. Would it be as performant? Absolutely not - but the performance gains wouldn't be worth the time and maintainability.

  • source
  • [–] 10 points 1 year ago

    From an administrator POV, python is great for scripting, automation, and AWS boto work.

  • source
  • [–] 6 points 1 year ago*

    In the Python documentary they mention the early creation of numeric as an alternative for closed options like Matlab; which led to Python being used in the sciences and data processing. Then later it became the natural choice for machine learning in the early 2010s and the AI explosion of 2020+.

  • source
  • [–] 5 points 1 year ago (1 child)

    Because it's actually good and also easy.

  • source
  • hideshow 1 child comment
  • load more comments (1 reply)
    [–] 5 points 1 year ago* (last edited 1 year ago) (12 children)

    Presumably because it minimizes developer time in writing code and is easy to use and it come with great libraries. That is why I have been using it since 1998.

    Edit: People use to think I was crazy using Python. It was interesting seeing people slowly get a clue over the years.

  • source
  • hideshow 12 child comments
  • [–] 5 points 1 year ago

    I'd say libraries is why it is popular. Also, I'm not a Python developer, and I don't bother with libraries.

  • source
  • [–] 4 points 1 year ago

    I started using it as an alternative to Octave/Matlab and Perl. Python is better at general programming than Octave/Matlab, and better syntax than Perl (IMO) while being almost as easy to do the same stuff I was using Perl for. It's very good for quickly writing small scripts. Issues can arise on large projects/teams because of stuff like type safety, and it also has issues with performance.

  • source
  • [–] 2 points 1 year ago

    Python is one of 4 key programming languages in world. C as a systems/performance/building block language (which I get has competitors). Javascript for node performance and web language. J as being the most powerful syntax/paradigm and best designed language.

    Python has to be the most important due to all of the support it has, including C++ and other building block language/library imports that allows it to be the LLM integrator choice. A field that moves so fast, you couldn't import libraries fast enough in another environment. Another shoutout to J is that its terseness is a good LLM fit due to less token consumption. But integrating with python is essential.

  • source
  • load more comments
    view more: next ›