I’ve been trying to understand Elixir macros and structs.
During my journey I ascertained the extent to which atoms (an ostensibly potent and novel type for language extension) are utilised to the effect of essentially exploding the language out from it’s kernel.
I read that around 91% of Elixir is written in Elixir, 8.1% is written in Erlang and 0.5% is written in other. Am I correct in my understanding that Elixir’s core functions are written in Erlang, and that core functionality was designed to enable the construction of operators, macros and structs by experienced users (core teams) of the language which then allowed the explosion of the language’s size and its continued extensibility?
In other words, every written module/function, operator and variable which, ultimately are tuples of some sort, goes back to the core functions to be processed appropriately?
I’m asking this because if my understand is correct then I am somewhat more confused by macros. Are defmacros also tuples? Where do they go to be processed appropriately, what is meant by the statement “macros write elixir code”, are they used to extend the core functionality in the kernel?
If my writings sound like ramblings it’s because I’m down a rabbit hole.