There's a general rule to name any unused variables with an _ in Elixir. Doing so stops anything being bound to that variable.
However I have noticed a widely used pattern of prefixing with an underscore to denote an ignored argument, in the form of _tail (with the intention being to provide a hint as to what the variable would be).
This is encouraged by the language via a warning in the shell if you try to then access _tail:
warning: the underscored variable "_tail" is used after being set. A leading underscore indicates that the value of the variable should be ignored. If this is intended please rename the variable to remove the underscore
But here's the catch; _tail has the variable bound to it, whereas when using just _ it does not.
Does this mean that there's a performance penalty when naming ignored variables with anything other than an _? Or does Elixir still bind _ behind the scenes, and just error on any attempt to access?
Edit: It looks like the Erlang compiler specifically optimizes this case to treat _* as _ and thus there is no overhead, source: http://erlang.org/doc/efficiency_guide/myths.html