4 ms·
ocaml is a great language in its own right too; the only haskell features I find myself really missing are do notation and operator overloading.
by zem 9y ago
ocaml is a great language in its own right too; the only haskell features I find myself really missing are do notation and operator overloading.
- kornish 9y agoAlso the multicore concurrency.
- kornakiewicz 9y agoF# does have operator overloading.
- systems 9y agobut F# doesn't have Ocaml's performance, which I believe was the point being made for ML over Haskell I honestly don't know how F# compares to Haskell over performance
- bpicolo 9y agoF# is essentially just C#, which should be reasonably performant? It's possible the persistent data structures aren't optimized I guess? Pity something's busted in the benchmarks game: http://benchmarksgame.alioth.debian.org/u64q/fsharp.html http://benchmarksgame.alioth.debian.org/u64q/fsharp.html
- wtetzner 9y agoBut it's missing the module system, which is IMHO OCaml's best feature.
- agumonkey 9y agoSome people also complain about a tiny set of syntactic issues. Other than that I like both ml and ocaml.
- pjmlp 9y agoHaving learned ML languages via Caml Light, I never understood what those complaints are about. Maybe the only thing I would complain would be the separation between integer and floating point math.
- agumonkey 9y agonot even the monomorphism, I forgot but there's a few warts at the syntactic level only.
- k__ 9y agoA few months ago I read monomorphism is the way to go performance wise. Something about people writing fast code with Flow/TypeScript than with plain JavaScript because the typing leads to less polymorphic code which is easier to optimize for the compiler.
- tom_mellior 9y agoIn this context, "monomorphism" just meant that OCaml requires you to write "+" to add integers and "+." to add floats (and yet other things to add bignums or whatever). This has nothing to do with performance per se. It doesn't make OCaml code faster than languages that allow you to write "+" for both int+int and float+float. The compiler knows anyway.
- k__ 9y agoBut that's what most devs do, right? If it doesn't look like C it's ugly, haha. Anyway, Reason seems to have a bit nicer syntax than OCaml, I think.
- 9y ago
- hxegon 9y agoOCaml seems like the ideal language for me on the surface, but the onboarding process is... suboptimal IMO. There's a lack of good soft/hard documentation (AKA the "no, type signatures are not sufficient documentation" problem), but my biggest turn off is the multiple standard libraries. Some might see that as a plus, but when I'm just trying to get a small learning project off the ground, and I find out there's a critical library I need that's incompatible with the stdlib I'm using is a huge bummer. Not saying these are insurmountable, unforgivable problems, just really annoying.
- wtetzner 9y agoI feel like the biggest thing missing from OCaml is a Cargo-like build tool (probably using OPAM under the hood for dependency management). It would also be nice if OPAM had better cross platform support. The only way I could get it working on Windows was through one of the distributions that bundled Cygwin.