lua-users home
lua-l archive

[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.