lua-users home
lua-l archive

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


Paul,

I've read Mr. Graham's article and found it quite enlightening. I've waded a bit through the world of LISP, but I'm sure we have quite a lot of people in the list who understand fully the language's features and might provide us with a better comparison than the one I might conceivably furnish.

However, to try to answer your question: lua programs can execute lua code that's built on run-time. Look for dostring(). I'm not sure if that's enough to parallel "macro" capability, but my guess would be it is.

I do recommend Paul Graham's article, referenced below, as good reading for any programmer -- particularly one that hasn't learned any new languages in the last year or so. :)

(BTW: how do you think we could rate 'Befunge' (a bi-directional language) in the lattice? And please don't get me started on the n-directional variations... ;) )

  Cheers,

     Pedro.

Paul Hsieh wrote:
One of the reasons I'm looking at Lua right now is that it seems to
be a language as pure and simple as LISP (only one powerful abstract data type from which all other data types must be derived) however according to the article here:

http://www.paulgraham.com/paulgraham/avg.html

the author claims that the main power of LISP over other languages is its "macro" ability (rewrite code at run time.)

Does lua have a similar capability? I.e., can you "coerce" a table into a chunk? I am guessing the answer is no, given that code input is in standard C strings rather than LUA strings. Do you think this would be worthwhile feature to have?
--
Pedro Miller Rabinovitch
Gerente Geral de Tecnologia
Cipher Technology
www.cipher.com.br