Lua Versus Ruby

lua-users home
wiki

Introduction

Ruby [1] is a dynamic, object-oriented language similar to Python.

Similarities

Both are relatively new, portable, light, high-level languages.

Differences

As in LuaVersusPython, (+) equals pros (-) equals cons. (?) equals undecided.

Ruby

(?)Ruby is entirely object-oriented. Everything is an object in Ruby.

(+)Ruby has a large user community and consequently has a large and various collection of libraries and documentation.

(+)One Ruby web application framework, Rails, has recently gained wide name recognition.

(?)Rich syntax with many non-alphanumeric characters used.

(-)Ruby is not easily embeddable. However, MRuby is very easy to embed.

Lua

(?)Lua has meta-mechanisms to implement object-orientation. However it retains the flexibility to rely on other techniques.

(-)Some functionality is still being built. Documentation is concise.

(+)Lua has two web-application frameworks, Kepler and Aranha. Both of which continue in the spirit of Lua. Light, extensible, and portable.

(+) 'One of the main reason that won me over to Lua from Ruby was that Lua already had a very good VM which allows Lua programs to be compiled and also to execute a lot faster than Ruby (x2 in most cases).' This might change with the upcoming "MRuby". MRuby is a ruby subset targeted at embedding on small devices, with its own VM. The development version is publicly available since May 2012 on Github.

See Also


RecentChanges · preferences
edit · history
Last edited October 16, 2012 3:45 am GMT (diff)