lua-users home
lua-l archive

Re: Symmetry between language and C API (Was: (not) handling new programming idioms with grace

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


2018年07月23日 16:47 GMT+02:00 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>> The problem with the concatenation operator is that it concatenates
>> just two values.
>
> Yes, but it is associative and "a..b..c..d" generates a *one*
> instruction, not *three*.
It's perfect in an actual expression like that.
But a function join(...) that just concatenates all its arguments,
respecting metamethods, is so easy to provide in the API and
so hard to do in pure Lua.

AltStyle によって変換されたページ (->オリジナル) /