4 ms·
I used to love Python, back when it was basically just an alternative to perl for scripting. Now it strikes fear into my heart when I encounter something largis
by umvi 1y ago
I used to love Python, back when it was basically just an alternative to perl for scripting. Now it strikes fear into my heart when I encounter something largish written in Python because it usually means "super slow bloated researchy untyped ai/math code that's a nightmare to work with"
- kev009 1y agoI was a big fan of python between 10 and 15 years ago for similar reasons, it felt "cleaner" than other scripting languages while also having rich standard and extended libraries. With no real recent experience (I fell deep down the hole into C/kernel etc), I wouldn't have any authority to judge how it's adapted to time. But the most common complaint I've observed at companies of all size and sophistication is "the deployment story is a disaster". But it also seems like uv allows people to do all the "I want this specific version of such and such and I don't want $OS to know about any of this" well? Re math/ai it's an interesting comment because a language is one part the syntax/stuff you receive, and one part the community that tells you to do things a certain way. I'd guess that Python has become such a big tent it is a little hard to enforce norms that other languages seem to have. This somewhat reminds me of Bjarne Stroustrup discussing scaling/evolving a language.
- nighthawk454 1y agoI think a lot of it is things have shifted away from the raw language. Less and less you’re dealing with Python, and more an assortment of libraries or frameworks. Pandas, numpy, torch, fastapi, …, and a dozen others. Packaging has been a nightmare. PyPI has had its challenges. Dependency management is vastly improved thanks to uv - recently, and with a graveyard of tools in its wake. The modern Python script feels more like loosely combining a temperamental set of today’s latest library apis, and then dealing with the fallout. Sometimes parallels the Node experience. I think an actual Python project - using only something remotely modern like 3.2+ standard library and maybe requests - is probably just as clean, resilient, and reliable as it ever was. A lot of these things are and/or have been improving tremendously. But think to your point the language (or really the ecosystem) is scaling and evolving a ton and there’s growing pains.
- kev009 1y agoI can see that. A little while ago I was working at a startup and we had a node.js thing that was really crucial to the business that did some gray hat browser automation stuff to scrape TikTok (the users opted into it, but TikTok itself was less permissive). For some reason a person wanted to move part of it to Python to orthogonally solve some other actual problem. They passed me the code and Pandas was there to effectively do an HTTP request and parse JSON and I thought to myself "woah, I'm not in Kansas anymore" -- I ended up not having to worry about it because I ported the idea back to the more mature node system and that turned out to be viable over time. Libraries can overtake aspects of a language for better and worse. Ruby seemed really tied to Rails and that was great for it as an example.
- nighthawk454 1y agoHa, Pandas just to parse a website is a bit extra, I’d say. But yeah, it’s weird that you need libraries and api endpoints to do basic tasks these days. It feels like something broke around 2015-ish. Going back, you could make a whole app and gui with Basic. You could make whole websites simply with HTML+PHP, sometimes using nothing but Notepad. You could make portable apps in Java with no libraries - even Swing or whatever was built in. Now…? Electron, a few languages, a few frameworks, and a few dozen libraries. Just to start. Bizzare.
- WD-42 1y agoEveryone wants to be a programmer but nobody wants to write any damn code — Ronnie Coleman
- deleted 1y ago[deleted]
- dralley 1y ago"math code" is generally using wrapped native libraries not really all that slow. But this seems like an apples to oranges comparison. Yes, of course a few scripts are very different than "something largeish" written in Python
- b33j0r 1y agoThere are two types of people who use python: those who understand statistics and those who write python. I’m happy that python basically took over the role once filled by matlab, and I’m happy that it became the leader in AI dev instead of something worse (probably Java if gpt2 had hit 5-10 years earlier). But you’re right. It’s not fun anymore. It feels more like a pseudolanguage for expressing tensors now, because of the influx. I’m exaggerating only in feigned outrage. In my actions, I’ve been coding in rust, go, and zig ever since ChatGPT came out. I think that moment made me value python less. When I think about why, it’s because python became less challenging, and the problem space shrank. It’s been fun to go back to low-level and remember how computers actually work.
- WD-42 1y agoI feel so similar. I love python, I’ve spent most of my career writing it. It’s done well for me. But damn is it just not fun anymore. Runtime errors are not fun anymore. Runtimes are not fun. Virtualenvs are not fun anymore even though uv is trying. Typeless loosy goosy code that passes dictionaries all over the place is just not fun. Rust ruined it for me. Or maybe I’m just bored.
- morningsam 1y ago>Typeless loosy goosy code that passes dictionaries all over the place is just not fun. mypy --strict in CI & don't let dict[str, Any] pass review if the keys are constants, insist on a dataclass or at least a TypedDict.
- ihaveajob 1y agoI'm wondering, what language do youb love nowadays?
- nikolayasdf123 1y agoGo
- smohare 1y ago[dead]
- nikolayasdf123 1y agoC
- cherrycherry98 1y agoAgreed, as an OO scripting language it's lovely, especially compared to Perl where the OO features never meshed quite right. Going back 10 years ago it had a number of things that were novel compared to other languages: literals for common data structures, context managers ("with" statement), first class functions, comprehensions, generators. On the other hand duck typing is largely a joke. Letting functions take anything as an argument and then just assuming it's a duck with the methods you want is no way to write a robust system. Performance wise you're boxed into a corner. The slow runtime will have you writing native code in another language, complicating your project. The GIL will have you jumping through hoops to work around. As an offline data exploration and research tool limited to an individual or a small team, or for writing small utilities, I totally get it. For anything mission critical I'd much rather be in something like Java or C# where the typing situation is stronger, the performance is going to be much better, I have better access to threads if I need them, the reasons for dropping into native code are fewer, and the cross platform support works more seamlessly without additional layers like Docker.
- kamaal 1y ago>>Agreed, as an OO scripting language it's lovely, especially compared to Perl where the OO features never meshed quite right. Back then the whole OO crowd was with Java though. Python's Moat was beginner friendliness to write simple scripts, which at the time- Perl was more like a thermonuclear scripting language. Most people who never wanted to graduate to that advanced stage of writing mega million lines of Perl code over a week(which was literally the use of Perl then), realised they needed some thing simpler, easier to learn, and maintain for smaller scripts- Kind of moved to Python. But then of course simplicity only takes you that far, and its logically impossible to have a simple clean interface to problems that require several variables tweaked. Python had to evolve and is now having the same bloat and complications that plague any other language. Having said that, I would still use Java if I had to start a backend project.
- pjmlp 1y agoWhen Perl ruled the Earth, the OO crowd was with Smalltalk, Object Pascal, Delphi, Clipper 5, FoxPro, Actor, CA Objects, VB, C++. In fact, many books that the OOP haters attribute to Java, predate its existence.
- zahlman 1y agoWould you really feel better about the same volume of Perl code, that was also using some FFI to a heavyweight C or Fortran math library?
- _ea1k 1y agoI'm happy to see this take gaining some steam. Python got a lot of love while it was growing to where it is now. IMO, that was largely well deserved. But it seemed like a lot of people overlooked why it was loved. Most of us weren't wishing that our 2k+ line projects were all written in it. Those little 20-500 line scripts were just so much more fun in Python than anything else though, and it showed up in survey after survey.
- pansa2 1y ago> Those little 20-500 line scripts were just so much more fun in Python than anything else though It's notable that you've written this in the past tense. These kinds of scripts don't seem to be a focus for Python any more. In fact, I recently heard as justification for a new Python feature: "it helps us with our 100-million-line Python codebase". The language has become extremely complex as it prioritizes the needs of a few teams writing millions of lines over millions of developers each writing relatively few lines. The reason is that the design team are all working on these large codebases and, understandably, mostly focused on what makes their own lives easier. I was hopeful that in the transition from a BDFL-based governance system to a Steering Council, we would see a larger variety of experience and opinions designing the language. Instead, I don't think there has ever been a single scientist, finance worker etc on the Steering Council - it's always software developers, almost always employees of large software companies.
- WD-42 1y agoI’m curious what about the language is getting more complex. Any examples? The ecosystem definitely seems to be getting much more complex, but the language itself hasn’t evolved dramatically since type hints that I can remember.
- pansa2 1y agoType hints aren’t a single addition - with every release they get more complex. It wouldn’t surprise me if the language included 20+ typing-related PEPs by now. The other obvious example of complexity is pattern matching. The feature is very complex, especially how it breaks established rules of the language. It also required fundamental changes to the interpreter to accommodate it: a rewrite of the parser from simple LL(1) to PEG.
- smohare 1y ago[dead]
- ActorNightly 1y ago>"super slow bloated researchy untyped ai/math code that's a nightmare to work wit I love reading comments like this because it just makes me feel good about my job security. You are aware that things like Youtube and Uber back ends all run on Python, right?
- deleted 1y ago[deleted]
- pjmlp 1y agoThat has always remained my sole use of Python, scripting OSes and applications, my use of Tcl for application software trained me avoiding languages that always require going down to C for any performance related task. Best of all with this approach, is that what is in the standard library suffices, no need to mess up with venvs, PYTHONPATH, or whatever is the current trend.
- elcritch 1y agoPython was similar for me after learning Perl and some C in highschool. During university I used Python 2 on and off. It was amazing during that era and what I could build. Then came Python 3 and it just never felt the same. PyQT projects faltered. Deps split. Strings broke. However I started using Nim a few years back which has given me that Python 2 feeling – except with static types, better overall language design, meta-programming, and performance!
- wolvesechoes 1y ago> However I started using Nim a few years back which has given me that Python 2 feeling – except with static types, better overall language design, meta-programming, and performance! And except tooling, ecosystem, documentation and practical real-world application.
- elcritch 1y agoThere are plenty of practical real world usages from companies shipping video games, one of the first and most featureful eth2 servers, websocket servers powering millions of requests at Reddit, etc. Apparently some use in HFT as well now. True the LSP is pretty bad, but Cursor makes up for a lot of that for me. Atlas dependency manager is great. Valgrind and TSan work perfectly. Gdb sorta works now. LLMS solve the docs issue. The ecosystem is smaller, but I've been able to use it to successfully create tools for an IoT project with Nim running on an embedded esp32, a multi-threaded api server on linux processing images, and a web SPA with Karax in a couple of weeks of programming work. Oh and calling into Python for some datascience.
- wolvesechoes 1y agoI obviously used hyperbole, as probably every single language out there is used in some serious project. And personally I am very fond of D language, so it is not like I am going to shit on Nim or anything else. I just had na impression that your comment implicitly express a sentiment popular on this website - that there is virtually no reason to use shitty Python in AD 2025, as some language X is as good or better in everything. But then you find out that Nim people still rely on Nimpy, Rust people on PyO3, and even Julia people on PythonCall. Yeah, no reason to use Python anymore, except by calling Python from your awesome language. The fact that these awesome Python packages are just wrappers over C/C++ doesn't change much - for some reason people using other languages are not willing to write and maintain wrappers of similar quality, including documentation.