Status of ocaml bindings

Hello list,

Since reading the kaleidoscope tutorial I have decided to play around with creating a language I've had in the back of my mind for some time. I would prefer not to write the front end in c or c++ though if it can be avoided. I read online that the ocaml bindings are distributed with llvm but are not always as up to date as the c or c++ bindings. Is this (still) the case? Is there anything that the c/c++ bindings can do that the ocaml ones cannot?

Thanks sincerely for your help,
Jason

Hello list,

Since reading the kaleidoscope tutorial I have decided to play around with creating a language I've had in the back of my mind for some time. I would prefer not to write the front end in c or c++ though if it can be avoided. I read online that the ocaml bindings are distributed with llvm but are not always as up to date as the c or c++ bindings. Is this (still) the case? Is there anything that the c/c++ bindings can do that the ocaml ones cannot?

The C++ objects (values, instructions, modules, ...) are opaque in
OCaml. To program them, we need to use the wrapped C++ interfaces for
these objects if there were, and we cannot 'pattern-match' these
objects. For example, the current OCaml bindings can let us build a
LLVM IR (the high-level source language can be translated into LLVM IR
with these interfaces), call any existing analysis or transformations.
To design a new pass in OCaml, it might need to expose more C++
primitives, so it is more convenient to program in C++ once we can
build IR from the source language with OCaml bindings. But I don't
know if there is an better way to expose C++ to OCaml.

Ok, thanks for your answer. I'm just looking to mostly do the front
end like is in the tutorial (plus some H&M type inference, but I
suppose llvm itself probably wont help much with that) so it sounds
like Ocaml could be enough for what I need.