We use #python for quite complex demanding parts of our software, where dynamic typing is quite essential (e.g. an editor where users wire together components dynamically which are incrementally translated into output, and a incremental data processing system based on a dependency graph).
I think any other programming language would make that a nighmare.
But we also use #cpp for all performance critical parts, and #java / #quarkus for more traditional backends.
#cpp and #python via the standard #python C API plus some proprietary generic script bindings connecting to a proprietary dynamic method invication system on the #cpp side.
Works well so far.
As a colleague recently pointed out to me: That's one of the advantages of a #microservice architecture that you can easily mix languages and freely choose a language for each new service.
Yes, dynamic typing causes additional issues not present with statically typed languages as the article points out correctly. But many problems are dynamically typed, and then youo start using dynamic casts also in statically typed languages, and get into the same issues anyway ...
@alebaffa@folkerschamel Are you using mypy? If not, you should. It's not the same as rust's typing, but it is pretty powerful in what it can do (even more powerful than rust in some aspects).
I don't do python without it anymore nowadays (if avoiding python altogether isn't an option).
@folkerschamel@alebaffa Yes, it uses type hints, but it doesn't require them. It's very well feasible to start with none and incrementally add more and more over time.
But as a serious comments: I see your point of the possibility of gradual adaption.
But right now the number and seriousness of typing related runtime error bugs are a vanishingly small. So I don't see a need for it. Yes, this is a quite different experience than Jos Visser describes in this article.
Add comment