Earlier quoted context omitted.
I also find it hard to spot why OCaml is the natural "step up" for creating real world applications instead of Haskell, Rust, Clojure or even Kotlin, C++, Python and Go.
let's see: - OCaml vs Haskell: eager vs lazy (=> memory consumption is more predictable) - OCaml vs Rust: OCaml has a GC (=> comfort) OCaml has tco (could not resist this ;) ) - OCaml vs Clojure: vastly superior typing system. (=> less bugs) - OCaml vs Kotlin: no JVM needed. - OCaml vs C++: more safety. once it compiles it will not segv. - OCaml vs Go: vastly superior typing system. (=> less bugs) - OCaml vs Python:…
OCaml Programming: Correct and Efficient and Beautiful
21–30 of 251 posts
Re: OCaml Programming: Correct and Efficient and Beautiful
#22My introduction to programming course in my university was in OCaml. It was all downhill from there when it comes to the programming languages I had to use.
Which university? Does the course have a public webpage?
Re: OCaml Programming: Correct and Efficient and Beautiful
#23I spent a lot of time on Standard ML in university. OCaml was always portrayed as the engineer's alternative for real applications. I spent some time brushing up on OCaml a few years ago using Exercism.io. While OCaml is a personal "top tier" language, I'd always prefer Haskell, Rust or Scala. Type classes / traits just seem to beat a higher-order module system for me.
Still, I'd pick either over Scala. Superior compilation times, cleaner syntax, less complex. Haskell also just feels excessively clever.
I had hoped Rust would be "OCaml but for systems programming" and it sort of is, -- but the borrow checker and memory safety features, as neat as they are, add a lot of mental overhead.
Re: OCaml Programming: Correct and Efficient and Beautiful
#24Earlier quoted context omitted.
Which university? Does the course have a public webpage?
Not the original commenter, but my first year course of Introduction of Programming 15 years age was also using OCaml. There were two groups of students, standard one was using Pascal, and the functional one using OCaml. I was studying on Warsaw University and the lecture notes are in Polish: https://mimuw.edu.pl/~kubica/wpf/wpf.pdf
Re: OCaml Programming: Correct and Efficient and Beautiful
#25Earlier quoted context omitted.
let's see: - OCaml vs Haskell: eager vs lazy (=> memory consumption is more predictable) - OCaml vs Rust: OCaml has a GC (=> comfort) OCaml has tco (could not resist this ;) ) - OCaml vs Clojure: vastly superior typing system. (=> less bugs) - OCaml vs Kotlin: no JVM needed. - OCaml vs C++: more safety. once it compiles it will not segv. - OCaml vs Go: vastly superior typing system. (=> less bugs) - OCaml vs Python:…
OCaml vs All: Good luck finding developers that will write quality code and not cost a fortune each.
Re: OCaml Programming: Correct and Efficient and Beautiful
#26My introduction to programming course in my university was in OCaml. It was all downhill from there when it comes to the programming languages I had to use.
Re: OCaml Programming: Correct and Efficient and Beautiful
#27This was largely due to automatic currying in OCaml — if I have a function call "some_function arg1 arg2" and "some_function" adds a third argument, that call becomes a function that requires a single argument, arg3, but the typechecker message that tells you all of this is well-nigh unintelligible.
Switching to Rust was a blessed relief, not least because Rust has much better developer tooling and documentation (but also no automatic currying).
It made me think that OCaml is efficient and beautiful if you're the only person touching your specific codebase (which I think is true in the vast majority of cases) or if many of your colleagues are deep OCaml officionados with PhDs, but it's not a good collaborative language for the rest of us.
Re: OCaml Programming: Correct and Efficient and Beautiful
#28Earlier quoted context omitted.
let's see: - OCaml vs Haskell: eager vs lazy (=> memory consumption is more predictable) - OCaml vs Rust: OCaml has a GC (=> comfort) OCaml has tco (could not resist this ;) ) - OCaml vs Clojure: vastly superior typing system. (=> less bugs) - OCaml vs Kotlin: no JVM needed. - OCaml vs C++: more safety. once it compiles it will not segv. - OCaml vs Go: vastly superior typing system. (=> less bugs) - OCaml vs Python:…
What about Swift?
Re: OCaml Programming: Correct and Efficient and Beautiful
#29Earlier quoted context omitted.
I also find it hard to spot why OCaml is the natural "step up" for creating real world applications instead of Haskell, Rust, Clojure or even Kotlin, C++, Python and Go.
let's see: - OCaml vs Haskell: eager vs lazy (=> memory consumption is more predictable) - OCaml vs Rust: OCaml has a GC (=> comfort) OCaml has tco (could not resist this ;) ) - OCaml vs Clojure: vastly superior typing system. (=> less bugs) - OCaml vs Kotlin: no JVM needed. - OCaml vs C++: more safety. once it compiles it will not segv. - OCaml vs Go: vastly superior typing system. (=> less bugs) - OCaml vs Python:…
I have no horse in this race, but claiming it to be "vastly superior" and implying "less bugs" makes it sound like this is a logical consequence, when you're actually staying on one side of an endless debate that to me doesn't have clear winners. For instance, from the little I've learned about Clojure, they claim the lack of a "vastly superior type system" is a feature, not a bug, and it's a result of a fundamental difference in some beliefs about how to write correct software.
From this I wonder how misrepresentative your other comparisons are as well. But don't get me wrong, OCaml is probably my "favorite language I've never actually used" (I've never "actually used" Clojure in "real projects" either).
Re: OCaml Programming: Correct and Efficient and Beautiful
#30Every time I use recent "functional" languages (Rust, modern Typescript) I realise how great OCaml is