Java has all the strong typing and static checking, all you need is to type a lot more words.
Java has all the strong typing and static checking, all you need is to type a lot more words.
Situations where you don't want the heavy-weight and complex JVM.
Cases where you need to interact with C/C++ code a lot (ML, etc.).
Companies where python is the norm and introducing another language adds a lot of overhead.
Edit: Okay I see the original guy stated Java. It is what it is. The real useful answer is to just use any other typed language, and not use Python.
The stuff that `zope.interface` gets you is honestly on the... heavy side of what I think makes sense for a lot of scenarios (especially in Python). Which would explain it's relatively low uptake despite having been around for like... 15-20 years??
I haven't used `typing.Protocol` yet (I am mostly still working in 3.7), but it seems to roughly capture the level of 'heaviness' that seems workable.
I do get your gist though. Sometimes I wonder what I'm doing type annotating stuff.
You can use it if you install the typing-extensions package: https://pypi.org/project/typing-extensions/
I have to say, I despise trying to decipher untyped functions. This arg is called "order" - do you want an instance of Order, an order ID, or a function for sorting?
Fine, I'll read the docstring. Instead of using the IDE.
as for other stuff (web-servers, what not), I don't think python can beat kotlin / typescript / etc