3 ms·
Mostly working in languages with strong type inference, I too find many type hints in Python a little bit verbose and unnecessary for a reader. Though thing is,
by TheMatten 5y ago
Mostly working in languages with strong type inference, I too find many type hints in Python a little bit verbose and unnecessary for a reader. Though thing is, without giving up on some features that make inference undecidable in general (like arbitrary subclassing), you're not going to get language that can both infer most types from code and do so in a way that actually gives you some interesting guarantees about it.
You mention that you're not interested in typechecking, but to be honest, why bother with restricted format of stuff from `typing` if you don't care about automatic processing of these? You could just as well emulate math notation with ASCII, use LaTeX or simply descriptions. Though at that point, are they actually more than a traditional documentation?