Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What are the actual places you'd like to see improvement as an experienced user? A sibling post siggested concurrency, but from the outside those choices mostly seem to make sense. I've read complaints about opam/dune, but for simple stuff it seems to work fine.




The tooling remains so so. Opam is okay but it's not cargo. Dune is weird. Dune is actually very weird. I don't like Dune. It does work fine however.

Onboarding can be complicated. I'm complaining about new comers not reading the documentation before writting articles but objectively some concepts are so foreign, it's a bit difficult to see what you are missing. Module level programming for exemple is key to writing good Ocaml and it's quite a step if you are entirely new to functional programming. Effects are great but conceptually it's quite hard to get your head around them. Some fairly common libraries use Haskell influenced monadic interface. Yet another hurdle.

Traits have their flaws but I have to agree that having to be explicit all the time can be annoying. Modular implicit would be nice.

Concurrency is soon to be a lot better now that the effect system is mostly there and eio is landing.

The standard library is in the best shape it has ever been. I would still like more.


I do think maybe it should have stayed single threaded, or only allowed parallel iteration/loopsbfor fine grained parallelism. It was a completely safe language before 5 as long as you didn't pass -unsafe wasn't it?

It seems like you need to either be purely functional or have a borrowchecker if you want to have "fearless concurrency".


Is there a niche that OCaml fits really well with few packages needed? For example: Go has a great stdlib for networking (servers, etc); Rust is pretty good for CLI tools.

I've used OCaml for writing small compilers and it was really clean but that's a toy thing that will not see much real world usage.


Compilers, provers and static analysers. It's awesome for that. That's what the language was built for initialy: developing the Rocq prover.

It's surprisingly nice for web development also when you compile to JS. The ecosystem around Mirage and microkernel is quite impressive and if you want to build low level things and I for one like it significantly more than Rust for CLI tools.

It's a very versatile language honestly. It's opinionated enough that you have a clear idea of what would be the community choice but not so much that you can't just go to town with a different solution if it suits how you want to approach the problem more even it is an imperative implementation or even something object oriented.

I personally view Ocaml as basically a better Python with more features, better performance but without the huge success.


Speaking of OCaml vs Python, I quite enjoyed this post from 2014, and actually his whole blog post series: https://roscidus.com/blog/blog/2014/06/06/python-to-ocaml-re...

I don't particularly use OCaml anymore (though might in the future I guess), but one thing I remember is that sometimes when you had different parts of type system interact the compiler would just complain that you can't do that (mixing variants and GADTs was one such case I think?) without any real indication that this would be a problem before you try it. I get why this happens and I don't know how many people would run into it, but some kind visible notice or documentation for these cases would be nice.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: