Re: [GD-General] Scripting in Lua tutorial
Brought to you by:
vexxed72
From: <cas...@ya...> - 2002-12-20 15:40:27
|
Eero Pajarre wrote: > I would just like add my comment: Don't let the small size of Lua fool > you to think that it is "too simple". I am still starting with it, but > much of Lua programming is metaprogramming. This seems to have both > advantages and disadvantages, the language is very powerful for the user > who knows how to use it, but the novice user might wish for rigid > framework built in into the languge, instead of being metaprogrammed > on it. Yeah, Lua metaprogramming facilities are very powerfull, you can use it as a simple imperative language, but you can turn it out into a functional or object oriented language, you can implement inheritance, multiple inheritance, delegation, messaging, etc. There are also many different ways of binding code to lua. There are binding generators (tolua, swig), but another posibility is to take advantage of reflexivity. If you already have a reflexive class system, it should be possible to bind it to lua. See for example the bindings to com and corba. I haven't too much experience with other language bindings, but I've heard that lua c interface is very low level, and that it's easier to write bindings for other languages (javascript, io). The result of that is that lua may be simple on the surface, you can use it as a simple language, but you can also use it in more complex ways. However, taking the correct decisions and doing it right for the first time may not be that easy. Ignacio Castaño cas...@ya... ___________________________________________________ Yahoo! Sorteos Consulta si tu número ha sido premiado en Yahoo! Sorteos http://loteria.yahoo.es |