Hacker News new | ask | show | jobs
by jamil7 1403 days ago
> you might want to check out OCaml for general purpose programming

Any tips on backend frameworks to look at? I need to write a small websocket service for a side-project and have always wanted to try OCaml. I came across https://github.com/aantron/dream.

2 comments

Dream is great for small http services -- I've not used the websocket support so I can't say much about it.

I do highly recommend starting with one of the Dream example projects just to lower the barrier to entry on the tooling side.

You can also use Rescript (compiles to very readable Javascript), which is the OCaml type system with more familiar syntax and some of the complexity shaved off.

You'll have a much easier time doing business stuff with F# - it's OCAML inspired but has access to broader .NET ecosystem. We're using it on front end as well w/ Fable compiler. It's pretty awesome.