lua-users home
lua-l archive

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


On 01/12/2012 22:43, Pierre Chapuis wrote:
In my opinion Lua is not best learned in a class. It is best
learned by reading the manual. Especially in a printed version.
When you have it into your hands you think "Is that really all
there is to it?" Yes, it is all there is to it. Lua is a jewel,
a wonder of software design and you choose to use it when you
realize that. But you cannot realize it if if you have not used
other languages first.

+1

That being said there is something I think Lua is the perfect
language to teach: Object Orientation. Because to use OO in Lua
you implement it, and you understand it is not something so
complicated. You also understand objects can be seen in two
ways: structures with related methods (the x:foo() style) and
closures (the x.foo() style).

+1

You could state a similar point about data structures. (Also about Lisp and friends, but you don't get efficiency with association lists ;-) Lua provides a proper tool to build any kind of composite data (record, object, tuple) or collection of data (array, set, map...) or linked data (graph, tree, list)... but the prerequisite is one knows these structures simply exist that they, and a clear idea of their _meaning_; because in Lua proper, semantically as well as practically, everything in indistinclty just a table. What I mean is that noone will just happily discover all that by jus using Lua, but should better come to it preequipped with rather wide and deep knowledge and experience. I have long been surprised by assertions about Lua beeing intended for non-programmers --even supposed highly motivated and intelligent. Lua is indeed used by non-programmers... (just spend a few days on a dedicated forum to have an idea of the ubiquitous issues and actual practices).

Denis