Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are infinitely many runtime properties that are simply impossible to determine statically.

Static typing is just a tool, aiming to help with a subset of all possible problems you may find. If you think it's an absolute oracle of every possible problem you may find, sorry, that's just not true, and trivially demonstrable.

Your example already is a runtime check that makes no particular use of the type system. It's a simple "set contains" check (value-oriented, not type-oriented) which also is far more expensive than simply verifying the string prefix of a Slack-style object identifier.

Ultimately I'm not even saying that types are bad, or that static typing is bad. If you truly care about correctness, you'd use all layers at your disposition - static and dynamic.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: