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

> "your code compiles" is much closer to "your code is correct".

That is so far from the truth.



How is it anything but the truth? The express purpose of static analysis, like a type system, is to catch bugs before running your code. That pretty clearly means that code that successfully compiles is closer to being correct than code that doesn't.


I mean, correct as in logically correct and that's just a different matter than being grammatically correct.


The parser assures your code is grammatically correct; the type system assures your code is semantically consistent, which is usually a much stronger guarantee, and by most practical measures will be closer - often much closer, and for total functions on total types, sometimes all the way - to "logically correct".




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

Search: