[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Arrays and Tables
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sun, 25 Jun 2017 04:03:59 -0300
> I was looking to see if Lua ever had a distinct array type, and
> reading the hopl paper it seems that Lua 1.1 indeed had distinct array
> and table types but the two types were merged to a single table type
> in Lua 2.1.
That is not true. Lua 1.1 had distinct notations for constructors of
arrays (lists) and records, but the underling table was already the same:
So we took SOL’s syntax for record and list construction [...],
and unified their implementation using tables: records use strings
(the field names) as indices; lists use natural numbers
-- Roberto