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

I'm not saying types always model your problem properly! That's not even well specified. I'm saying that "x has type foo" is never wrong if the program typechecks properly. That's totally different, and it means that you can rely on type annotations as being correct, up-to-date documentation. You can also trust that functions are never applied to the wrong number of arguments, or the wrong types; my point is that this guarantees more, in a less expressive way, than specs.


You can statically analyze specs and check them at runtime if you want.


Can you? Is there any tool that actually does that reliably?



The words "static" or "analysis" do not appear there. I imagine you meant that you can runtime check the specs, which, well, is no replacement for a type system.




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

Search: