lua-users home
lua-l archive

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

On Wed, Jul 17, 2013 at 10:10 AM, David Demelier <> wrote:
type(10) -> "number", "integer"
type(10.0) -> "number", "float"

This is not a bad idea, it will not break compatibility but adds a
second feature to determine the actual type of the integer.

But such a change is a source of subtle errors - in the _expression_ f(type(x)) the function f will be called with two values, and this may mess its little mind if it has optional arguments. Also, {type(x)} now has length 2.

(Saying this because string.gsub is always biting me this way)