What attributes are common for developers to know and use in professional Elixir development? For example, there is:
-
@moduledoc- provides documentation for the current module. -
@doc- provides documentation for the function or macro that follows the attribute. -
@behaviour- (notice the British spelling) used for specifying an OTP or user-defined behaviour. -
@before_compile- provides a hook that will be invoked before the module is compiled. This makes it possible to inject functions inside the module exactly before compilation. -
@callback- used to a define a behaviour module, expecting a function name and typespec -
@vsn- used by the code reloading mechanism in the Erlang VM to check if a module has been updated -
@impl- used to identify a function as implementing a callback function for a particular behaviour module -
@spec- defines a typespec for a given function
What other attributes are we missing?
Edit: full-disclosure, I want to update the docs with a full list of these. They’re good to know ![]()





















