Erlang and OCaml - Erlang/OTP

14 downloads 177 Views 36KB Size Report
Oct 5, 2007 - Ericsson AB 2007. Erlang and OCaml. 2007-10-05. 4. Safe driver programming. ▫ Try to link OCaml code int
Erlang and OCaml Ulf Wiger Ericsson AB

Why??? ƒ Erlang is very good at concurrency ƒ Not so good at raw sequential processing ƒ Strong momentum in systems programming ƒ OCaml has a reputation for speed ƒ No particular momentum in concurrency programming ƒ We should try to lower the barriers between different FP languages

© Ericsson AB 2007

2

Erlang and OCaml

2007-10-05

Today’s low-level option ƒ Linked-in driver in C ƒ Unsafe ƒ A bug is likely to crash the Erlang VM

© Ericsson AB 2007

3

Erlang and OCaml

2007-10-05

Safe driver programming ƒ Try to link OCaml code into the Erlang runtime... ƒ ƒ ƒ ƒ ƒ

Static typing Safe memory management Speed that rivals C Stay within the functional paradigm (maybe lure some OCaml:ers into Erlang programming)

© Ericsson AB 2007

4

Erlang and OCaml

2007-10-05

Status ƒ No particular progress yet ƒ A google group and Google Code project exist – ErlOCaml (?) – No code submitted

ƒ Some enthusiastic, but busy, members ƒ OTP group cautiously favour the idea

© Ericsson AB 2007

5

Erlang and OCaml

2007-10-05

OCaml ƒ The OCaml runtime is almost completely written in OCaml ƒ Fairly common to link OCaml into legacy C code ƒ Powerful preprocessor (camlp4) – good for parsing ƒ Some issues re. dynamic linking of native code

© Ericsson AB 2007

6

Erlang and OCaml

2007-10-05