[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
**Subject**: **Re: Arithmetic on strings**
**From**: Roberto Ierusalimschy <roberto@...>
**Date**: Wed, 13 Jun 2012 18:50:20 -0300

> 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

**References**:
**Re: Arithmetic on strings, ***liam mail*
**Re: Arithmetic on strings, ***Andrew Starks*
**Re: Arithmetic on strings, ***Javier Guerra Giraldez*
**Re: Arithmetic on strings, ***Roberto Ierusalimschy*
**Re: Arithmetic on strings, ***liam mail*
**Re: Arithmetic on strings, ***Hans Hagen*
**Re: Arithmetic on strings, ***Roberto Ierusalimschy*
**Re: Arithmetic on strings, ***Hans Hagen*
**Re: Arithmetic on strings, ***Roberto Ierusalimschy*
**Re: Arithmetic on strings, ***Hans Hagen*