That is not the reason. It makes sense to compile to Erlang AST representation and leverage all the power (codegen/optimisations/…) of Erlang compiler for free.
Re:Erlang OTP 22.0 is released
by adamkittelson on Tuesday May 14, 2019 @09:06AM
(#19909064)
I have no idea about the bytecode documentation, but Elixir is definitely not transpiled to Erlang.
To be technically correct, Elixir is compiled into "Erlang Abstract Format, which is a standard representation of an Erlang AST using Erlang terms." [1] From there it compiles down to bytecode using Erlang tool chain.
So saying that Elixir is transpiled to Erlang is incorrect: it compiles to Erlang AST.
[1] https://medium.com/@fxn/how-does-elixir-compile-execute-code...
Hah, sorry, also posted a similar response in parallel but on parent! I had to google though, I couldn't remember if maybe Elixir used Core Erlang, I'm still a little fuzzy on where that's used and if any important relation to Erlang Abstract Form
Maybe you heard something about Elixir compiling to Erlang Abstract Form?
I’ve heard that the BEAM VM byte code is not well documented (maybe in comparison to JVM bytecode), which is one reason that Elixir transpired to Erlang first; is this true?