Re: table.concat and __concat
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: table.concat and __concat
- From: Dirk Laurie <dirk.laurie@...>
- Date: 2015年9月10日 07:13:00 +0200
2015年09月09日 22:49 GMT+02:00 Soni L. <fakedme@gmail.com>:
> Why does table.concat not respect __concat? I wanted to
> make it error with a custom error message.
If you wish to experiment, `xtable` (see another recent thread)
offers such a function.
$ lua -l xtable
Lua 5.3.1 Copyright (C) 1994-2015 Lua.org, PUC-Rio
> help=xtable.help
> B=xtable.block
> help(B.concat)
--- concat(tbl,sep,first,last)
-- standard: second argument is used as a separator if a number or a string
-- extra: second argument is used as a filter if a function
-- nonstandard: `sep`=`nil` defaults to `tostring`, not to the empty string
-- extra: concatenation respects metamethods
-- missing: elegant workaround for stack overflow