Hacker News new | ask | show | jobs
by nomel 1275 days ago
I’m a fan of having a single state, used for everything. Splitting the code up into two states, one for the linter and one for the execution, seems like a recipe for incorrectness and confusion. I would hate to refactor something like that.
1 comments

The issue is that sometimes a function can take a type that is an optional dependency, so you don't want to import it unless you are type checking.

(And some types are defined in the typeshed so only exist to be imported during type checking; eg the type checker lib itself is a dependency in this case)