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]
- Subject: Re: Symmetry between language and C API (Was: (not) handling new programming idioms with grace
- From: Dirk Laurie <dirk.laurie@...>
- Date: 2018年7月23日 17:20:39 +0200
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.