I've already started seeing organic adoption of assertions.
2019: “static types are amazing!”
I’m still salty about this shift. No one really goes back and admits, “maybe we were all wrong.”
IMO, the best explanation is the high influx of new, young devs results in ideological conformity in lieu of developed aesthetics. This also explains the unnatural amount of sway by so-called “thought leaders.”
When you’re trying to ship an extensive application and building out features that few customers may ever use, types absolutely slow you down. When you’re integrating with a 3rd-party API, you have two differences:
1. relatively high confidence the API won’t change much, which makes implementing typed code lower risk and higher ROI
2. a slower feedback loop over the “reload the page” of rolling your own, so types catching issues earlier than heavy integration tests is much more valuable
I use untyped Ruby/Rails code for all of the CRUD, and golang AWS lambdas for anything integrating with SDKs/APIs. Best of both worlds, in my experience.
There are still some areas where it falls flat, but it is far more usable than before (very pleasant, in fact).
Having tried TypeScript and Kotlin, TypeScript is like a half-assed type system that gives you cryptic error messages in compile time and mindfuck stack traces in run time.
Using assert(value, message?) function ends up being more useful and ergonomic.
Microsoft was clearly going for a best of both worlds approach - .Net if you need it, just your data if you don’t. I find it a pain in the ass, but all the data guys at work love it because they can mix and match with our existing code and still do their own thing.
Python took off for data because the frameworks and libraries around it. Without IPython/Jupyter, dataframes, Scipy, it would have way less marketshare.
A lot of data scientists DO NOT want this. They're heavy on the science and less so on the software engineering.
I think this is one of the reasons Python took off.
Having to learn generics, type safety, exception handling, etc turns out to be a real pain when you're also learning about neural networks, AIs, etc.