[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: __tostring and string.format
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 6 Dec 2010 14:54:58 -0200
> I have to admit I'm still unconvinced, though. They are both quite
> similar ideas: when you call a table function you are expected not to
> break the "contract" that the table should not have any holes, and
> when you call table.concat() specifically, you are expected not to
> break the "contract" that the table only contain strings. If it's OK
> to not throw an error and return something the user might not be
> expecting when the first "contract" is broken, it seems like it should
> be just as OK for the second one.
I did not say it is not OK. Both behaviors are OK. The point is what
is more useful: error detection x flexibility. I think that, for %s,
flexibility seems more useful; but for table.concat, I guess error
detection is better.
-- Roberto