lua-users home
lua-l archive

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


2014-08-01 17:36 GMT+02:00 Coroutines <coroutines@gmail.com>:

> I have trouble taking the whole 'coercion in lua is bad' thing anyway.
> It's not like Javascript where you can concatenate and add two things
> together with the same operator (+).  I am never confused about this
> in Lua as + will derive numbers, and .. will derive strings.  There is
> no overlap for operator use.  I don't find these "coercion sites" very
> ambiguous even if metamethods are called from left-to-right on
> availability.  I'm just tired of people who hate coercion in every
> language speaking like they know what's best for Lua from an
> ideological pedestal.

Personally, I _love_ coercion and would love to have __tostring
invoked automatically by table.concat.