Hacker News new | ask | show | jobs
by Skinney 4022 days ago
Minor nitpick. BEAM doesn't have pattern matching built-in. Core Erlang does. Core Erlang compiles to BEAM bytecode with functions using regular if-statements. So basically: Erlang/Elixir -> Core Erlang -> BEAM. (Actually, I think there is one more step there).
1 comments

Minor nitpick to the nitpick, since I dug down in Elixir's compiler before. Elixir spits out a normal Erlang AST, not a Core Erlang AST, which is a bit different. There are a half dozen levels between the Erlang AST and BEAM as well. There's several instances of a talk by Robert Virding about implementing languages on the BEAM where he talks about which advantages different levels of the compiler to hook into.