[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: In praise of 'nil' (Was: Proposal for table length operator
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 15 Dec 2010 08:55:22 -0200
> It is reasonable to expect that a core function like tostring will not
> crash when fed with basic Lua code (if a __tostring metamethod is
> defined, it is another story, of course).
It does not "crash". It raises an error when called in an incorrect
manner (there is nothing to be stringified). Most functions in Lua raise
an error when called with missing arguments.
The manual clearly states that 'tostring' expects an argument.
-- Roberto
- References:
- Re: Proposal for table length operator, Gunnar Zötl
- Re: Proposal for table length operator, Mark Hamburg
- Re: Proposal for table length operator, Roberto Ierusalimschy
- Re: Proposal for table length operator, Mark Hamburg
- In praise of 'nil' (Was: Proposal for table length operator, Dirk Laurie
- Re: In praise of 'nil' (Was: Proposal for table length operator, Axel Kittenberger
- Re: In praise of 'nil' (Was: Proposal for table length operator, Dirk Laurie
- Re: In praise of 'nil' (Was: Proposal for table length operator, Pierre-Yves Gérardy
- Re: In praise of 'nil' (Was: Proposal for table length operator, David Kastrup
- Re: In praise of 'nil' (Was: Proposal for table length operator, Pierre-Yves Gérardy