Hacker News new | ask | show | jobs
by Spivak 1626 days ago
Yeah, it’s always awkward to have to declare a variable or add an assert or a weird cast thing to make the type checker happy. Basically any case where type hints have to be evaluated at runtime for syntactic correctness.

The import pattern in the article is actually something I’ve never encountered because of how common the HAS_MODULE pattern is. I’ve never even thought to override the module binding.