ocamljs, OCaml to Javascript compiler
It can be hard to go back to a conventional language once you’ve enjoyed the freedoms of typed functional programming. That’s why, when we needed to write some Javascript at Skydeck, our first inclination was to find some way around it. Javascript is not such a terrible language—it has higher-order functions at least—but we missed the safety of static type inference and OCaml’s expressive features like variant types and pattern matching. So instead of writing Javascript, we wrote ocamljs, a back end to the OCaml compiler that generates Javascript.
We are proud to release ocamljs version 0.1 as free software. We are building Skydeck’s products on a foundation of free software (part of what makes OCaml such a great choice for us is its extensive library support) and we are very grateful to the developers of that software for making their work available. So we are pleased to contribute back to the OCaml community, and intend to continue doing so.
You can download ocamljs 0.1 here. This release is very preliminary and without question contains bugs, but we are using it successfully for production software, and we intend to continue to improve it. For the moment we have no mailing list or developer site for ocamljs, but you can send questions, bug reports, and patches to Jake Donham, jake dot donham at skydeck dot com.
Update 10/13/2008 There is now a Google Code project for ocamljs, along with a mailing list.