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

Currying and type inference do not make function signatures meaningless, unfortunately however, reading their types is a skill that you need to practice for it to become natural.

As for global type inference the one in F# is only partially global (between Scala and ML , Haskell). Anytime you are dealing with ad-hoc polymorphism, even when F# has inferred the types, you will often have to put the type in. Full point free programming also does not always resolve if you are into that.

I have gotten into the habit of putting types and names for complicated functions in comments (///). I also write short descriptions for particularly dense pieces of code and have gotten in the habit of writing clearer, less dense code with full names because otherwise it does take longer to mentally unpack. That is, functional languages make it easy to write stuff like: let wu wp wn nu y x = wp * (exp (nu * y * x)) , wn * (exp (-nu * y * x))



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

Search: