lua-users home
lua-l archive

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


On 10 July 2011 14:19, Eike Decker <zet23t@googlemail.com> wrote:
Actually, I've been wondering myself why co:status() doesn't work. I
would be a bit more convenient, like it is for strings. About
simplicity: Creating such a metatable for coroutines is just a matter
of a few lines of code in C.

My vote is for this not to happen and the reason why is close on its heels:
 
But actually, coroutines are not the only case: Numbers, boolean and
the nil lack a metatable as well. It would be sort-of nice if one
could write (3*1.5):floor(). For boolean and nil I can only think of
one useful function and that would be :tostring.

I would like to submit a request to the creators of Lua that they not go down the path of turning Lua into Ruby.  Given how simple it actually is to add all this stuff for those who want it, both from the C side of the fence and the pure-Lua side, I'd prefer to see Lua kept lean and clean.  People who want to have Lua-flavoured Ruby (or Ruby-flavoured Lua) can easily make a library (call it Corundum or the like) that does all this without polluting the main distribution.  Toss it up on Github or Bitbucket and you can even let the whole Rua (or is it Luby?) community go nuts on it and replicate the Ruby landscape in Lua to their heart's content.

Of course we could turn Ruby into Erlang instead....

--
"Perhaps people don't believe this, but throughout all of the discussions of entering China our focus has really been what's best for the Chinese people. It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.