[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [CORRECTION] lua_concat right-associates! (Was: lua_concat left-associates: bug or feature?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sun, 9 Dec 2012 19:58:16 +0200
2012/12/9 Dirk Laurie <dirk.laurie@gmail.com>:
> However, an experiment involving code that calls lua_concat on a table of
> objects with metamethods that print information about their arguments, reveals
> that table.concat in fact does the concatenation from left to right.
In response to Jay's answer to my post, I stripped down my experimental C code
to something presentable — and realized with a shock that by pushing
the elements
of the table onto the stack, their order is reversed! So lua_concat
does what it should!
Sorry about the noise.
This does not mean that I accept Jay's point about implicit parentheses — but
Denis has taken that up, allowing me slink away quietly in disgrace.