Comment by eternityforest

1 year ago

Using types properly is always annoying. Seeing MyPy report no problems makes it worth it.

I find myself doing a lot of isinstance() and raise TypeError, but that's still a huge win, protecting everything after I've asserted the duck type is what it should be.

I also use beartype for runtime protection.

Typescript is pretty amazing though. I really like how integrated the ecosystem is.