lua-users home
lua-l archive

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


On Mon, Aug 3, 2009 at 8:58 PM, Luiz Henrique de
Figueiredo<lhf@tecgraf.puc-rio.br> wrote:
>> Regarding the strings as monoid, with the addition as concatenation,
>> is nowhere near wild, it's wildly normal ;-)
>
> Sure. But that does not mean you *need* to use "+" to represent its operation.
> AWK for instance uses nothing (i.e., juxtaposition), which is the popular
> practice in formal languages.

Right, you absolutely don't _need_ to use "+" here, and I am not
trying to argue in that direction. My point was just that the
"mathematical not sound" argument seemed bogus to me.

Presumably there are some other reasons for this design decision.
Actually, I darkly remember something, let's check... Yes, the
"Evolution" paper on Lua says "Because the language allows coercion of
strings to numbers, a + signal would be ambiguous; so, we created the
syntax .. (two dots) for that operation [concatenation]."

Colin