[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: i18n in Lua
- From: Tony Finch <dot@...>
- Date: Fri, 14 Jan 2011 00:44:28 +0000
On 13 Jan 2011, at 19:19, "Robert G. Jakabosky" <firstname.lastname@example.org> wrote:
> I do the same with for loop variables that I don't want to use. The first
> time I saw the use of _ I thought the compiler used it as a special way to
> omit that variable. I have since found that it is just a valid variable
> I have seen the use of _ before, but I can't remember where.
Many languages use _ as a wildcard / dummy variable in their pattern matching syntax, e.g. Erlang, ML, Haskell. In these languages _ is special since unlike normal variables it isn't bound to the value that it matches and isn't unified with its other instances.
f.anthony.n.finch <email@example.com> http://dotat.at/