Live data from Hacker News

OCaml 4.03: Everything else

blogs.janestreet.com

1–10 of 84 posts

Re: OCaml 4.03: Everything else

#6
If I were already sold on using Haskell or OCaml for a new project, what would be the big seller for OCaml being the choice? I haven't dug into SML or OCaml and I'm not expert with Haskell yet but from looking at them they don't look substantially distant from Haskell.

Re: OCaml 4.03: Everything else

#7

If I were already sold on using Haskell or OCaml for a new project, what would be the big seller for OCaml being the choice? I haven't dug into SML or OCaml and I'm not expert with Haskell yet but from looking at them they don't look substantially distant from Haskell.

Can't speak for OCaml yet; I've wanted to learn for a while but decided to go with Haskell first.

On the Haskell side of things--it's biggest seller (functional purity) is also the biggest downside. To give you an idea, papers have been written about the best way to implement common data structures purely functionally.

From what I've seen, OCaml has less "abstraction overhead" because it can dip into imperative code. While Haskell is really fun, it definitely has moments where you want to beat your head against your desk.

Re: OCaml 4.03: Everything else

#8

If I were already sold on using Haskell or OCaml for a new project, what would be the big seller for OCaml being the choice? I haven't dug into SML or OCaml and I'm not expert with Haskell yet but from looking at them they don't look substantially distant from Haskell.

I've only written Haskell, but I'll try to give a fair shakedown from my perspective:

+ OCaml is eagerly evaluated while Haskell is lazily evaluated. This makes it easier to reason about things like memory use in OCaml.

+ IO is reflected in the type signature of Haskell functions. You may find this annoying because it stinks to have to change a lot of type signatures just because, e.g., you want one of your utility functions to make a log entry when called.

On the other hand, IO is often a huge deal either semantically or from a performance perspective. For big projects having IO reflected in the type system can be a huge help.

+ The ecosystems are different. Haskell's is bigger, though I've heard the quality of OCaml libraries tends to be very high.

Re: OCaml 4.03: Everything else

#9

Still no support for threads running in parallel? I guess things didn't go well: https://news.ycombinator.com/item?id=9582980

There's still hope!

There are a number of much anticipated features that haven't made it into this release. In particular, the multicore GC, which at one point had been expected to land in 4.03, has been pushed back, likely to 4.04.

Post reply on HN