Reply to comment

Why Lua?

I friend of mine recently asked me what I thought of Lua. It is, after all, the first language that I chose to integrate with the rewrite of the Crate Game Engine. The language itself, the syntax and structure, I am somewhat indifferent about. However, I am interested in it for other reasons:

  • Very lenient license restrictions: The site specifies:
    Lua is free software: it can be used for any purpose, including commercial purposes, at absolutely no cost. No paperwork, no royalties, no GNU-like "copyleft" restrictions, either.
  • Fast: faster than most interpreted languages such as Perl and Python and squarely slower than any compiled language. A pretty good middle of the road.
  • Tiny interpreter which is easily embedded in another application. From the website:
    Under Linux, the Lua interpreter built with all standard Lua libraries takes 144K and the Lua library takes 196K.
  • Integrates well with C++. Using SWIG can make the process of exposing your C++ classes and objects to the Lua interpreter almost trivial.
  • It is one of the few languages designed for embedding.

Lua Resources:

Lua 5.1 Reference Manual

Programming in Lua, Second Edition

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • Lines and paragraphs break automatically.
  • You may post PHP code. You should include <?php ?> tags.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Images can be added to this post.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.