[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (rc3) now available
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 30 Nov 2011 13:58:26 +0200
> Lua 5.2.0 Copyright (C) 1994-2011 Lua.org, PUC-Rio
>> return string.format("%d", 2.5)
> stdin:1: bad argument #2 to 'format' (not an integer in proper range)
> stack traceback:
> [C]: in function 'format'
> stdin:1: in main chunk
> [C]: in ?
It's the old tradeoff — which deserves helpful behaviour more: an
error because something that should be an integer isn't, or untidy but
not incorrect programming?
I lean towards the former. It might alert the user to dep lurking bugs.
Dirk