Hesitating between C/C++, OCaml, and F# for my compiler

Viewed 2342

I want to start working on a little compiler and to build it I am hesitating between several different languages.

My requirements are simple, I want to be able to emit LLVM-IR code cause I have a LLVM backend I would like to reuse to target a specific platform.

So right now I have the following choices :

  1. Use OCaml and the LLVM bindings - Efficient, LLVM ships with the OCaml bindings, but the coding experience with OCaml (IDE, support) is not the best.

  2. Use C/C++ and the LLVM bindings - The most obvious way I would say, but I would like to use a functional language as this topic is new to me and I want to learn something new.

  3. Use F# - I felt in love with this language, but there are no official LLVM bindings. So I guess I could do the same through the use of System.Reflection.Emit. Even though it seems like there is an initiative here for F# binding for LLVM - https://github.com/keithshep/llvm-fs

I would love to get your thoughts on this.

1 Answers
Related