[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: table design choices
- From: spir <denis.spir@...>
- Date: Tue, 24 Nov 2009 10:13:36 +0100
(below just wish to know about original design choices I couldn't find in docs about lua history -- I don't mean there bad, nore good)
-1- reasoning on single container type
Why is a single container type supposed to be better?
My view is actually there are three use cases, which map to distinct conceptual notions:
* sequence = indexed values
* "directory" = named (or more generally key-ed) value
* structure = either "record" (eg position={x=1, y=2}) or "object" (eg point={pos={1,2}, color="#ffffff"})
The first 2 cases are close, but the latter is really different. Rather a kind of named tuple.
-2- reasoning on choice of table
Why is a table supposed to be better as single container type? (compared to lisp/scheme list)
denis
________________________________
la vita e estrany
http://spir.wikidot.com/