Use in Other Languages
Ruby and Perl use $_
as a special variable described as the “default input and pattern matching space” — any output defaults to that variable, and may be omitted. In Perl, @_
is a special array variable that holds the arguments to a function.
In some languages with pattern matching, such as Standard ML, OCaml, and Haskell, the pattern _
matches any value, but does not perform binding.
In the interactive Python interpreter, the special variable _
holds the result of the previous evaluation.
Read more about this topic: Underscore, Usage in Computing
Famous quotes containing the word languages:
“No doubt, to a man of sense, travel offers advantages. As many languages as he has, as many friends, as many arts and trades, so many times is he a man. A foreign country is a point of comparison, wherefrom to judge his own.”
—Ralph Waldo Emerson (18031882)