Live data from Hacker News

OCaml 4.03: Everything else

blogs.janestreet.com

31–40 of 84 posts

Re: OCaml 4.03: Everything else

#31

Earlier quoted context omitted.

Its easy to write imperative code in OCaml. OCaml also has a class system. These two points make transition from languages such as Python, Java... easier.

On the contrary, I think OCaml's class system is potentially very confusing to someone coming from mainstream object-oriented languages. Java programmers would be confused the most, because they would have to unlearn the most. In Java, a class is a type on its own right. An object of class (and, hence, type) `Foo` has a very specific data structure, even if this data structure is unknown to the user. On the other han…

Can you provide an example of " This happens if `bar`'s type contains negative occurences of its self-type"

Re: OCaml 4.03: Everything else

#32

Earlier quoted context omitted.

> IO is reflected in the type signature of Haskell functions. What you mean is, "effects are reflected". Haskell has a monadic effect system (IO is very rough-grained part of it), which can be combined via monadic transformers. Situations where you don't want to use OCaml: - you need good parallelism and using multiple processes are not enough (concurrency is fine, though) - you want a large pool of developers (also…

What if I want some hybrid? From OCaml, I want the awesome module system and strictness by default. (I'm not dismissing laziness or any other evaluation strategy - just saying strictness is a better default.) From Haskell, I want effects tracked in types, higher-kinded types and painless parallelism.

It's easy to hard to force Haskell into "not being lazy". I'd say Haskell in lazy-by-default. You could do lazy eval in non-lazy-by-default langs by using something akin to `Promisses` in JavaScript.

A better module system for Haskell is in the makings (Backpack by EZ Yang), but may or may-not be what you are looking for. To my understanding the module system of Haskell is not very limiting at all.

Re: OCaml 4.03: Everything else

#34
post #15

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

I really wanted to use OCaml, but it is adding features way later than I can continue to wait. I've started learning Ponylang as my CSP language over Elixir ever since I checked it out several months ago. Maybe OCaml will fit the bill one day. Jane Street's inertia seems to keep it going outside of the academic world, but that's a single linchpin in the commercial world outside of its academic pen.

Many commercial companies (and startups) use OCaml, eg Facebook, Bloomberg, etc

https://ocaml.org/learn/companies.html

Re: OCaml 4.03: Everything else

#35
post #12

And here is the pending effort for better experience of OCaml on Windows: https://github.com/ocaml/opam/issues/2191

Getting OCaml working at all on Windows was a hell nightmare early last year when we were setting it up for WebAssembly and that definitely soured people's opinions of it. We stuck with it because it had some dedicated fans in the working group (happily using it on linux, mostly) and it turned out to be worth the trouble, but otherwise we would have turned to some other language (F#, probably). So I'm really glad to see those problems are being taken seriously!

Re: OCaml 4.03: Everything else

#36

I really hope modular implicits will make it to the language one day. While OCaml libraries are no stranger to monads they usually only include `bind` and `return`. Since I'm coming from Haskell I'm used to a vast Applicative and Monad vocabulary and making do with just `bind` and `return` is rather painful. So having a generic library of Monad combinators that one could use with any Monad would be great. Also, being…

> Is there any place in the official OCaml repository / issue tracking system / wiki etc where one could check the status?

You can see some things on:

  https://github.com/ocamllabs/ocaml-modular-implicits
but you shouldn't take a lack of activity on there as a sign nothing is happening. For instance, Frederic is actively hacking on the prototype at the moment but hasn't pushed anything to that repo.

Re: OCaml 4.03: Everything else

#37
post #17

Earlier quoted context omitted.

"- you want a build system that doesn't suck" This is a very surprising claim. Do you have any examples how Ocaml specifically induces systems built on it to suck?

I don't think that's what was meant, but rather that ocamlbuild sucks. It's not the best.

I'm curious: The configuration file syntax is odd, but otherwise it tends to work. What are the additional problems?

Re: OCaml 4.03: Everything else

#38
post #12

And here is the pending effort for better experience of OCaml on Windows: https://github.com/ocaml/opam/issues/2191

Getting OCaml working at all on Windows was a hell nightmare early last year when we were setting it up for WebAssembly and that definitely soured people's opinions of it. We stuck with it because it had some dedicated fans in the working group (happily using it on linux, mostly) and it turned out to be worth the trouble, but otherwise we would have turned to some other language (F#, probably). So I'm really glad to…

I for one was quite disappointed to have bought the book "Real World OCaml" only to notice that it wasn't supported on Windows.

So aside a short gig to port old Caml Light code that I had lying around into OCaml, I actually spend my ML like coding in F#.

Re: OCaml 4.03: Everything else

#39
post #17

Earlier quoted context omitted.

"- you want a build system that doesn't suck" This is a very surprising claim. Do you have any examples how Ocaml specifically induces systems built on it to suck?

I don't think that's what was meant, but rather that ocamlbuild sucks. It's not the best.

The others are even worse. I tried using OMake and apart from having some neat features like watching files and automatically recompiling it was an incredible pain of setting it up - mainly due to the strange programming language used in its build files. Also, it has seen 0 updates in the last years.

It already starts with the compiler, calling them manually is quite a pain, especially if you want include any kind of library, which is why ocamlfind is such a huge win.

Re: OCaml 4.03: Everything else

#40
post #17

Earlier quoted context omitted.

"- you want a build system that doesn't suck" This is a very surprising claim. Do you have any examples how Ocaml specifically induces systems built on it to suck?

I don't think that's what was meant, but rather that ocamlbuild sucks. It's not the best.

Ah, yes, I parsed it wrong.
Post reply on HN