lua-users home
lua-l archive

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

2015-07-28 15:26 GMT+02:00 Soni L. <>:
> Currently these are the signatures for tostring and type:
> tostring (v) -> string
> type (v) -> string
> Would it hurt to change them to:
> tostring (v, ...) -> string, ...
> type (v, ...) -> string, ...
> (Similarly for math.tointeger/math.type/io.type, maybe also os.getenv, etc)

Vararging a parameter list is a breaking change, even if it is fully
backwards compatible with one-argument calls, because


will currently keep only one of the return values of "myfun". You will
need to insert parentheses in order to preserve that behaviour.

In my reply to a previous post [1] of yours, I referred to a package
that inter alia offers item-by-item evaluation of a one-argument function
over a vararg.