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

I think when he says bypass, he might mean you can explicitly cast to `any`.


Dynamic language proponents sometimes like to say that static types can't catch all errors and are therefore of little use.

Static type proponents sometimes like to say that unsound type systems that leave escape hatches are of little use.

The truth is that both are somewhat wrong.

Types are a tool. They help catch some errors and help code evolve - even when not completely sound, they still help catch some errors and evolve code.

They also don't understand all correct code, so sometimes they get in the way and when that happens, its important to get them out of the way in a manner that doesn't compromise things too much.

Nothing is black and white, there are only shades of grey.


In Haskell you can also explicitly cast to any type a using "error", "undefined" and "throw". But that's just what exceptions are in Haskell. This is fine, as long as it's only used in exceptional cases.




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

Search: