lua-users home
lua-l archive

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


Steve:

On Thu, Mar 16, 2017 at 1:53 PM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> On Thu, Mar 16, 2017 at 2:44 PM, Francisco Olarte
> <folarte@peoplecall.com> wrote:
>> I hope you just alias ( keep the insert name ), because otherwise when
>> you need "table.insert(list, 1, new_head)" append gets really ugly.
> Well then I would alias to insert, because it's not an append ;)

Nice, I asked because I always read rename as rename(3), not as link(3) .

> Not defending the practice, it's just what I tend to do.

No, the practice is fine for me. In fact I usually have
shift/unshift/push/pop/splice in my tables ( too much perl in the last
25 years ).

I find insert behaviour in lua confusing, so I sometimes alias it to
push ( when not using may table module ) ( I tend to assume insert is
making room and defaults to start, do not know why, for default at end
I prefer Java name, add ).

Francisco Olarte.