[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [Proposal] Mass-to-string/mass-type/mass-functions
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 28 Jul 2015 16:28:48 +0200
2015-07-28 15:26 GMT+02:00 Soni L. <email@example.com>:
> 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  of yours, I referred to a package
that inter alia offers item-by-item evaluation of a one-argument function
over a vararg.