lua-users home
lua-l archive

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

On Fri, Feb 11, 2011 at 8:23 AM, Dirk Laurie <> wrote:
> I ask you to grant that:
>    1. People who do not use the feature are not in any way affected
>        by whether it is available or not.

That's only true if their code has no bugs.  If someone accidentally
tries to add two strings together (maybe by using + where they mean
..), there's a chance it does an unexpected thing at runtime, rather
than just raising an error.

Even absent bugs, the behavior of lua_isstring / lua_isnumber /
lua_tostring in the C API is a minor, yet persistent, annoyance.

>    2. People who do use the feature will be inconvenienced it it
>        is taken out of Lua.

That's inarguably true.

One of Lua's greatest strengths is that it's small and simple.
Implicit number/string conversions feel like a bad idea in any
language, but I suspect an additional reason that some people would
like to see this feature removed is that doing so would make the
language even smaller and simpler.

But this topic is a minor nitpick, just like the 1-based array
nitpick.  Every language is going to have its quirks and gotchas.  Lua
has rather few of these -- this is almost certainly a function of its
small size -- and yet it provides a lot of utility.  If you view the
quirks as a cost, Lua has great value.

Greg F