A great (albeit maybe not as great as OCaml ;) alternative for web usage would be F# with .NET Core, which has become a joy to work with over the past year or so on macos.