Re: Turning Lua into C++ (was: alleviate the load of the GC)

  • From: Konrad Kuśnierz <iryont@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 02 Sep 2015 17:02:34 +0200

The language is good as it is. The only reason I'm using LuaJIT is because it focuses on actual performance, and not some rather trivial and not needed things within the language itself.

The goal of the LuaJIT should always be performance.

Iryont

I don't think anyone wants to turn Lua into C++; they want to turn Lua into Javascript :)

Personally, the thing I like about Lua is that the language grammar fits comfortably on half a page. It's a simple language, yet powerful (mainly because >closures work the way the gods of Lisp intended). Don't change that.

I'd add only one thing -- differentiating between initialization and assignment. Which means that "a = 2" should error if a can't be found in scope rather >than creating a new global variable; I'd suggest "global a = 2" for that.

There are other language warts (nil === undefined means that typos are difficult to catch; varargs and select() are ugly; even with the __eq metamethod, >you still can't use tables as table keys the way you'd want to; etc) but all languages have warts; trying to create the perfect language will never work.

I'm all for extending the standard library, though; you can do much worse than imitating the Python standard library and cherry-picking good stuff from >Penlight.

-Tudor.

Other related posts: