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

The change in GHC is just to make development easier. Basically, just imagine that instead of stopping at a type error, the compiler replaces the incorrect function with code to throw an error at runtime. So here the poorly typed function always errors, no matter what you pass it; in a dynamically typed language, it would work as long as the arguments passed at runtime have the correct types.

So it isn't anything like dynamic typing, or even quite like making type errors warnings--it's just a way to compile partially incorrect code to make changing the code incrementally easier. It's also not designed to be used in production.

It just automates the existing practice of temporarily commenting out offending functions and replacing them with `undefined' to get the whole file to compile.



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

Search: