Since when do you have to rewrite everything in Erlang? Erlang is happy to call out to code in C (or whatever) via ports, which are a way for Erlang to run untrusted code in isolation and restart it when it crashes. Unlike (say) Ruby or Python, buggy C libraries can't bring the whole system down in Erlang.