lua-users home
lua-l archive

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


On Thu, Feb 10, 2011 at 07:54:56AM +0200, Miles Bader wrote:
> 
> I don't think anybody actually thinks the automatic conversion is a
> good idea these days, but it's there for historical reasons.
> 

I think it's a good idea.  You've got the option to fill your program
with 'tonumber' and 'tostring' if you think automatic conversion is
bad, but you are not forced to do so.  That's the Lua way.

Lua coerces only to 'number' and 'string'.  There can be no ambiguity.  
Let the context decide.

If you prefer instead overloading '+' and '*' to mean concatenation
and repetition, you can always revert to Python.

Dirk