I was chatting with friends about types. It seems that "type" means so many different things in different programming languages, "type safe" does not really mean anything without context. So here is this blog post, of me trying to explain what do I think about types, and how it helps us to program.
Few days ago I was working on some API handlers in our server written in Haskell with the framework Yesod. There was a mistake, some secret data was accessible to normal users because we forgot to check the user's type, luckily it's not on production yet.
FunctionalDependencies という GHC 言語拡張がある.Haskell Wiki によると,Functional dependencies are used to constrain the parameters of type classes. と書かれているが,これはどういうことか.