lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Quoth Gavin Wraith <gavin@wra1th.plus.com>, on 2011-01-04 21:47:17 +0000:
> I note that other programming languages make a distinction between
> "lists" (indices a consecutive sequence of integers starting at 1 or
> 0 or whatever) and "hash tables", usually with strings as indices.
> That Lua amalgamates and extends the two seems to me to be one of
> its most interesting aspects. So how do others exploit this
> amalgamation in their Lua programming?

In SQLite, statement parameters can be bound by name or positional
index, and result columns have both names and positional indices.  So,
when binding to it, I accept any combination of forms in a single
input table, and result rows are output as tables with one positional
and one named key for each column.

(Yes, I know there's an existing popular binding elsewhere; I don't
remember what they do.)

   ---> Drake Wilson