lua-users home
lua-l archive

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

On Wed, May 6, 2015 at 8:04 PM,  <> wrote:
> +1 for each one of those.
> So, while we're going wild, I'll add a few of my own:
> One I found out about today (thinking that it should work, but it didn't) is
> when you use a function returned table to define a new function in that
> table directly.  Example,
>  local t = getmetatable('')
>  function t:__add(s) return self..s end
> works, but it cannot be written like:
> function getmetatable(''):__add(s) return self..s end
> One more, why not be able to do:
> ... = 1,2,3
> or
> "abc"[2]
> and, an implied iterator for strings, so that this is possible:
> for char in str do ... end
> (All of these I think make the language more appealing. Of course, lack of
> any of these does in any way limit the current abilities of the language,
> but having them adds a greater level of expressiveness, in my view.)

One of most appealing facts about Lua is that it is minimalistic
language. The less special cases, the better. There is Lua based
language MoonScript [1], which is more pythonic. MoonScript doesn't
require parentheses to apply a method to a string literal and it does
provide special syntax to iterate a table.



Best regards,
Boris Nagaev