5 ms·
I am not familiar with Erlang, so please forgive my ignorance in advance. Is Erlang an abstraction on top of Core Erlang? I ask because the later is far more
by austincheney 9y ago
I am not familiar with Erlang, so please forgive my ignorance in advance.
Is Erlang an abstraction on top of Core Erlang? I ask because the later is far more verbose than the former. Is there a performance or extensible benefit to this more verbose and precise form that I am not aware of?
- jacquesm 9y agoErlang is the top level user visible language. This gets transformed through several steps to at some point Core Erlang, which ultimately gets transformed into a binary representation that BEAM can interpret. The only benefit is that it is easier for a machine to do the transformation from Core Erlang to BEAM bytecode than it would be if that machine would have to transform Erlang in one go, similar to how a C compiler will first make a tree like representation of the program in memory, will then convert that tree into some assembly (or a meta assembly language that is still platform independent) which will then be converted to binary. Each of those stages has a corresponding equivalent in the Erlang domain: Erlang -> C Abstract Format -> AST Core Erlang -> Assembler BEAM Bytecode -> binary The equivalence is obviously not exact but good enough for this explanation.