5 ms·
At this point I'm fairly convinced that the effort one would spend trying to typecheck a python program is better spent migrating away from python into a langua
by mhh__ 1y ago
At this point I'm fairly convinced that the effort one would spend trying to typecheck a python program is better spent migrating away from python into a language that has a proper type system, then using interop so you can still have the bits/people that need python be in python.
Obviously that isn't always possible but you can spend far too long trying to make python work.
- davedx 1y agoUnfortunately with us being in the middle of the AI hype cycle, everyone and their dog is currently busy migrating to python.
- hu3 1y agoI don't see why AI hype means more Python code. State of the art AI models are all closed source and accessible through an API anyways. APIs that any language can easily access. AAa for AI model development in itself, yes it's mostly Pyython, but niche.
- davedx 1y agoBecause everyone and their dog thinks they need to be ready to develop their own models, in python. This is honestly a thing, at least in the startup world.
- mzl 1y agoI think you are underestimating the massive amounts of Python code that is built around these things. Also, a lot of businesses are not really interested in using an API for an LLM, instead they will modify and fine-tune their own models and deploy in their own data-centers (virtual or physical), and that means even more Python code. Sure, a system that only relies on token factory LLM APIs can be written in any language, but that is not the full width and breadth of the AI hype.
- hu3 1y ago> Also, a lot of businesses are not really interested in using an API for an LLM, instead they will modify and fine-tune their own models and deploy in their own data-centers You realize model training cost millions right? "a lot of businesses" doesn't pass sniff test here. I'm not even counting the large swaths of data required to train. And the expensive specialists. And then you'll have to retrain outdated models every so often. There's a reason that AI has only a handful of players delivering SoTA models and these players are all worth $5B+.
- mzl 1y agoSOTA LLM model training costs a lot, yes. But fine-tuning and training of smaller models is a lot cheaper. I've trained useful vision-models that delivered business value for industrial applications on a MacBook overnight.
- adamors 1y agoI’d be surprised if _anyone_ is migrating server code to Python because of AI.
- J_Shelby_J 1y agoSix month into learning to build a modern python app, with linters, type systems, tests, venvs, package managers, etc… I realized that the supposed difficulty of rust is drastically less than coming to speed and then keeping up with the python “at scale” ecosystem.
- mdaniel 1y agoMy strong suspicion is that such a story depends a great deal upon the personalities of the developers much more than any {tool chaos + type chaos} --- {new syntax + lifespan annotations} spectrum
- bjackman 1y agoI think you're forgetting how easy type annotation is. I occasionally spend like 2h working on some old python code. I will spend say 15 minutes of that time adding type annotations (sometimes requires some trivial refactoring). This has an enormous ROI, the cost is so low and the benefit is so immediate. In these cases migrating code to a proper language and figuring out interop is not on my radar, it would be insane. So having the option to get some best-effort type safety is absolutely fantastic. I can definitely see your point, it's a useful analysis for projects under heavy development. But if you have a big Python codebase that basically just works and only sees incremental changes, adding type annotations is a great strategy.
- guappa 1y agoIf you do that you need to compile, which means you can't just distribute a text file with your python program. You need a build infrastructure for every python version, every architecture and every OS. Have fun with that!
- rtpg 1y agoI don't understand this point at all. I've worked on Django codebases which have a huge set of typing problems... and while it's not 100% I get a lot of value out of type checking. You annotate enough functions and you get a really good linter out of it!
- ramraj07 1y agoIf you're supposedly good at software and you spent too long trying to make python work consider the possibility that you're not good at software? Python has flaws and big ones at that, but there's a reason it's popular. Especially with tools like pydantic and fastapi and uv (and streamlit) you can do insane things in hours what would take weeks and months before. Not to mention how good AI is at generating code in these frameworks. I especially like typing using pydantic, any method is now able to dump and load data from files and dbs and you get extremely terse validated code. Modern IDEs also make quick work of extracting value even from partially typed code. I'd suggest you just open your mind up to imperfect things and give them a shot.