3 ms·
Every time i got excited about OCaml and every time I tried, I was overwhelmed by syntax, and the fact that there is no type annotations. I don't understand ho
by dgan 5y ago
Every time i got excited about OCaml and every time I tried, I was overwhelmed by syntax, and the fact that there is no type annotations.
I don't understand how that's "a selling point" for the language, it makes the code even less readable than poorly named un-annotated python.
I d really like to use ut though,i think Haskell is the next closest
- rucikir 5y agoThere are type annotations. The syntax is `(expression : type_expression)`.
- yawaramin 5y agoNot only are there type annotations, but they get their own file—best of both worlds! https://dev.to/yawaramin/ocaml-interface-files-hero-or-menace-2cib https://dev.to/yawaramin/ocaml-interface-files-hero-or-menac... And especially nowadays with the state-of-the-art OCaml plugin for VSCode with type-on-hover and codelens, even reading interface files is super simple.