[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: table.maxn...
- From: Jay Carlson <nop@...>
- Date: Sun, 31 May 2015 11:50:27 -0400
On 2015-05-31, at 8:48 AM, Roberto Ierusalimschy <firstname.lastname@example.org> wrote:
> A key point of '#' is this:
> t[#t + 1] = v -- add v to the end of the list
> t[#t] -- gives you the last element in the list
> t[#t] = nil -- removes the last element of the list
> Before proposting any other semantics for #, think whether it supports
> these basic list-manipulation operations (insertion, deletion, access
> to last), and whether it can *build* lists containing nils using those
> operations. If not, the new semantics is not solving the problem.
I am quoting this for two reasons:
1) This is a very concise and useful set of statements about #. I wish it could fit in the manual. I will settle for giving it Google juice in the archives.
2) Because these are fundamental operations, I would wish again for this delicious (and perhaps unhealthy) sugar:
longer.name.t[#+1] = 7 ==>
_temp = longer.name.t
_temp[#_temp + 1] = 7
We had this in MOO, under the name t[$].