DEV Community

Discussion on: Static Typing vs Testing == Apples vs Oranges

Collapse
 
rvprasad profile image
Venkatesh-Prasad Ranganath • Edited

I doubt Python type hints support generics yet.

Anyways, you are right that generics would help. In this sense, richer static typing (e.g., linear types, ownership types, dependent types) might help checking properties/constraints via testing. However, I think we have long ways to go until static typing can tackle the kind of issues tackled by testing.

Collapse
 
dmerejkowsky profile image
Dimitri Merejkowsky

I doubt Python type hints support generics yet.

They do: mypy.readthedocs.io/en/stable/gene...

(e.g., linear types, ownership types, dependent types)

True dat.

Thread Thread
 
rvprasad profile image
Venkatesh-Prasad Ranganath

Good to know Python type hints supports generics :)