4 ms·
OCaml is not just FP. It's FP + strong static typing + modular programming + exhaustive pattern matching + fast compiles + great set of built-in compiler lints
by yawaramin 1y ago
OCaml is not just FP. It's FP + strong static typing + modular programming + exhaustive pattern matching + fast compiles + great set of built-in compiler lints (eg unused code warnings, mutation warnings). All of these things together help write very reliable code.
- pizlonator 1y agoThere is no evidence that any of those things lead to more correctness. It’s all feels
- yawaramin 1y agoThere's plenty of evidence. Here's the OCaml compiler catching a redundant rule in the Unicode line-breaking algorithm: https://www.unicode.org/mail-arch/unicode-ml/y2020-m03/0000.html https://www.unicode.org/mail-arch/unicode-ml/y2020-m03/0000.... People who like rejecting this kind of stuff as 'feels' are ironically also being guided by their 'feels'.
- differentmod 1y agoDo you have any thoughts on my other post in this comment section? https://news.ycombinator.com/item?id=44699548 https://news.ycombinator.com/item?id=44699548
- pizlonator 1y agoOne example of a compiler catching some issue isn't evidence. It's an anecdote. There's no scientific experiment you could run that proves, or disproves, that type systems lead to more correctness. It's a thing you cannot possibly know.
- yawaramin 1y agoWe already have scientific experiments that prove it. Here is a significant result: https://ieeexplore.ieee.org/document/7985711 https://ieeexplore.ieee.org/document/7985711 This is why I say that people who keep denying this are vibing based on their feels. Instead of asking for the evidence they just keep saying there can't possibly be any evidence.
- johnisgood 1y agoFor those who do not know, OCaml is multi-paradigm. You can do OOP and imperative in OCaml as well, not just FP. In a typical codebase, you may find a combination of all styles.