Commit 95ce60b
committed
Lua: lengths, stores, element reads, tostring and sorts of typed tables stay typed
`#t` of a shaped table is its length; a store under a computed key
goes through the table paths rather than boxing the table and the key;
an element read in range answers whatever the element's kind, since
the array part's boxes need no conversion; `tostring` of a number or a
string is its text. `table.sort` of a table with no metatable by a
function the types know is a sort of its own per shape and comparator,
the library's quicksort calling the comparator directly with the
elements as their type; the comparator keeps its parameter types.
git-bug: 6014bb2e506570bdf1027be52e7ffe65ecd271ceed34cd53f999bd4bede9edde1 parent b060da0 commit 95ce60b
2 files changed
Lines changed: 478 additions & 5 deletions
0 commit comments