lua-users home
lua-l archive

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


> interesting, so what is the trick for
> 
> local t = { 1, 2, "test", true }
> 
> print(table.concat(t))

There is no trick in this case. As I said, those cases should be
solved in an individual basis. Whether or not table.concat accepts
other types is somewhat independent of whether format'%s' accepts
other types, etc. Therefore, each function decides what coercions
to apply to its arguments. My point is that what each function does
can be independent of the coercions done by the language.

(It would be interesting if table.concat followed the semantics of '..',
but that already is not the case.)

-- Roberto