I'm following some tutorials but got confused seeing these variables, what exactly are these and what are they called?
I'm following some tutorials but got confused seeing these variables, what exactly are these and what are they called?
Those are module attributes.
There are some predefined module attributes, as described in Module documentation. @impl and @type are the predefined ones, described in the documentation for Module I referenced above.
It’s always a good idea to start with the language core and only then dive into frameworks, but since your question also mentioned phoenix-framework, it’s worth to mention that Phoenix nicely plays with module hooks, implicitly declaring some module attributes for convenient access to @assigns and like, but this is surely out of the scope of your current journey.