Hacker News new | ask | show | jobs
by gmfawcett 2088 days ago
F# lets you specify the types of function arguments and return values. If it will make your code easier to read and reason about, why not just do that?

I use Ocaml a lot, which is very similar to F# as you know... and I document the types of all toplevel values in my code. Not because the compiler needs it, but because it helps me navigate the code more easily.

1 comments

Yeah, but it is not very idiomatic and if I need to put types everywhere, but is the point of it at the end? Is like people that type python: Is screaming is the wrong tool for the job :)