Obviously that isn't always possible but you can spend far too long trying to make python work.
Obviously that isn't always possible but you can spend far too long trying to make python work.
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.
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.
You annotate enough functions and you get a really good linter out of it!
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.
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.
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+.
I've trained useful vision-models that delivered business value for industrial applications on a MacBook overnight.
This is honestly a thing, at least in the startup world.
Have fun with that!