[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: The "i" in "ipairs" (was re: Newbie: ipairs() for tables with non integer keys)
- From: roberto@... (Roberto Ierusalimschy)
- Date: Fri, 8 Dec 2006 12:21:07 -0200
> I suspect the name came from "indexed", like the "i"
> variables often used in numeric loops, but I've sought a
> canonical etymology in vain. I'd like to hear one from the
> Lua team.
As far as I know, the "i" variables used in numeric loops also came
from "integer", not from "indexed". In Fortran, variables starting with
letters from "i" to "q" (or "o"?) were integers by default, so "i" was
the obvious choice for an integer variable (followed by j, k, etc.).