23 Jan
2019
23 Jan
'19
7:04 a.m.
Hi James, As Ivan has mentioned, Protocols already allow for statical type checks: https://mypy.readthedocs.io/en/latest/protocols.html We didn't need protocols that often at Parquery, maybe half a dozen of times? While we didn't use them in Python, we had to use them intensively in Go where it is a bit of a nightmare. It gives you freedom for cases when your input arguments are fairly general (e.g., in a public library), but it made refactoring our _production_ code (i.e. specific in contrast to general) much harder since you couldn't look up easily which type implements which "interface" (as protocols are called in Go). Cheers Marko