5 ms·
Local inference is a gift sent from heaven, global inference not so much. Reading OCAML (and F#) is exhausting because you have to look into the implementation
by thomasz 5y ago
Local inference is a gift sent from heaven, global inference not so much. Reading OCAML (and F#) is exhausting because you have to look into the implementation of each function (or into a separate interface file) to figure out how it's supposed to be called and what it is going to return.
- pharmakom 5y agoMy IDE puts annotations on every function and I can hover over values. Typing them out seems pointless with the right tooling.
- ahartmetz 5y agoYou can hover one thing at a time, you can skim a page with your eyes very quickly. Making important information cumbersome to access is a terrible idea.
- TheMatten 5y agoOne could argue that this is better covered by IDE/tooling showing you inferred types / suggestions.
- lamontcg 5y agoIf the function is printed in a journal article, or you just use something like 'less' to look at the file all that information is not available. I find it kind of weird that we've normalized not being able to read the code outside of the proper program for it. Since those IDEs often cost money it starts to feel a bit like steps towards a walled garden to me, and I'm not sure its good for actual computer science.
- pharmakom 5y agoI think development containers are a better way to deliver code with a paper. Besides, the paper itself should optimise for clarity and global type inference languages allow type annotation where it might help. They simply let you skip type annotations which only add noise.
- brundolf 5y agoNot sure I'd say the IDEs "often cost money" these days
- lamontcg 5y agoWait for VSCode Enterprise.
- ReleaseCandidat 5y agoThat's what your IDE or LSP is for. That's also the difference in 'philosophy' between OCaml, F# and Haskell. Haskell has the 'same' global type inference but the community sees them as (often only ;) documentation.