Hej folks, hope you’re staying safe.
I wanted to share a project I’ve been working on for some time now: Caramel, an OCaml to Erlang compiler.
tldr: write OCaml and run it on the BEAM
Caramel has a highly expressive, sound type-system, and a blazing fast type-checker. This allows you to rule out entire classes of errors by using types that are closer to your domain, and fearlessly refactor large amounts of code without sacrificing development speed.
To achieve this, Caramel is actually a backend to the OCaml compiler, so it reuses its entire type-checking stack, with well over 25 years and millions of hours of academic research and industrial usage, and provides a new compilation target to Erlang.
So don’t let the candy fool you: this is not a toy.
The output of the compilation is idiomatic Erlang source code that can be compiled and ran with erlc
just like any other, and I’m working on integrating it with tools like rebar3
and mix
Otherwise it is getting to a place where you can play around with it so if you have any comments and feedback, it’s all very welcomed, feel free to AMA.
I’m also normally tweeting about it so that’s the best source of news at the moment.
Happy Halloween!
The latest release is v0.0.12, and you can find the release notes here: