Kernel.SpecialForms: Know the Environment and Limitations
Learn about Elixir's Kernel.SpecialForms, the non-overridable building blocks of the language, and the key environment pseudo-variables like __ENV__ and __CALLER__. Understand their roles and limitations to effectively manage metaprogramming and keep code grounded in what is possible.
We'll cover the following...
Even though Elixir is an incredibly extensible language, it has areas that are special and not overridable. Knowing where these are and why they exist will help keep us grounded in what is and isn’t possible when extending the language. It will also help us keep track of where our code is executing.
The SpecialForms module
The Kernel.SpecialForms module defines a set of constructs that we can’t override. They make up the basic building blocks of the language and contain macros such as alias, case, {}, and <<>>. The SpecialForms module also includes several pseudo-variables, which contain information about the environment at compile time. ...