3 ms·
Yes. Rust borrows quite a few things from the ML family of languages (and things unique to Haskell like "deriving"). OCaml has the advantage of offering very go
by mercurial 12y ago
Yes. Rust borrows quite a few things from the ML family of languages (and things unique to Haskell like "deriving"). OCaml has the advantage of offering very good performance while not having to deal with the borrow checker, but it doesn't have the momentum behind Rust (the community is quite small, and the number of libraries isn't that large). That said, it is a very nice language to work with, and offers a number of features absent from Rust, such as a great module system, structural typing, first-class laziness...
- stock_toaster 12y ago> OCaml has the advantage of offering very good performance > while not having to deal with the borrow checker My understanding was that OCaml had no support for parallelism -- so a single core is all you get. Is that not the case?
- mercurial 12y agoThat's true, though through Lwt (and Core.Async) it has good support for concurrency. However, the work on the parallel runtime seems to progressing at a steady pace, so parallelism is coming.
- stock_toaster 12y agoAh. Thanks for the info!
- pjmlp 12y agoNo. It does support parallelism and concurrency. The biggest issue is that the runtime still has a global lock, but it is in the process of being removed.
- masklinn 12y agoOCaml does have concurrency and parallelism support, but it has a GIL so their effectiveness is somewhat limited unless you go multiprocess. I believe there are serious efforts towards removing the GIL these days.
- pjmlp 12y ago> but it doesn't have the momentum behind Rust (the community is quite small, and the number of libraries isn't that large) How come, given the amount of use it gets in the industry and academia versus Rust that still hasn't reached 1.0?
- mercurial 12y agoThat's a good question. I think F# and Haskell have stolen a fair amount of OCaml's thunder. Meanwhile, Rust caters to everybody who is tired of C/C++ (putting D in the same position as OCaml, I guess?), while having nice enough constructs that people coming from high-level languages get interested in it. By contrast, OCaml doesn't have the "shiny new" feeling of Rust (also suffers from other issues, such as its standard library/libraries, and the tooling, and the "mlis are documentation" attitude that is fairly prevalent in the community). I'd say with more polish and a lot of marketing, it could easily gain more market share (even though some things have gotten much better since opam). Sometimes, working in OCaml feels like flying a starship equipped with XVIIIth century cannons. The awesomeness of many of its features is in stark contrast to the gaping holes of its ecosystem (no good INI parsing library in 2014? no usable pure OCaml regexp library?).
- swah 12y agoDoes OCaml still doesn't compile 1.0 + 2.0 or has that changed? Small stuff like this really bother some people and they fly off to Pythonland never to be seen again.
- mercurial 12y ago> Does OCaml still doesn't compile 1.0 + 2.0 or has that changed? I'm not quite sure what you mean? In any case, the compilation speed isn't really an issue (especially since we're talking about Rust, which last time I used it wasn't exactly fast).
- bam365 12y agoHe's probably referring to the fact that you have to use different arithmetic operators for int and float in OCaml, so it would have to be 1.0 +. 2.0
- scardine 12y agoI think most ML implementations still have poor support for unicode, and this is a killer feature for me.