Okay, I exaggerated the title a bit but most of the elixir’s source is written on top of elixir itself. But how? Did the chicken came first or the egg?
Turns out that, there is a technique called Bootstraping in compiler design which creates a self compiling compiler. What that means is, you write the core compiler for Y language in X language and then write a new version of the X compiler in Y language. Then you compile the Y compiler with the X compiler. Mindfuck.
In Elixir, the core compiler is written in Erlang and the tooling and libraries are written in elixir itself.
Coming from a ruby background with no prior CS degree, this really caught me off guard.
Top comments (1)
I just got mindfucked 🤣🤣
This is a whole new concept to me but yeah, I kinda get it