lua-users home
lua-l archive

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

On Mon, Jul 9, 2012 at 12:38 AM, Miles Bader <> wrote:
> E.g., I agree that the format %s directive should call tostring on its
> argument.  But I think (1) string.concat should not,

Well, there is no string.concat :). [I know you meant table.concat.]

Off-topic: wouldn't it be nice if we had a string.concat that just did
(without some sanity checks and maybe luaL_tostring):

int string_concat (lua_State *L)
  lua_concat(L, lua_gettop(L));
  return 1;

Sure would make it easier to concat a dynamic number of strings
without using an intermediate table.

- Patrick Donnelly