lua-users home
lua-l archive

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


I think you cannot teach CS correctly with just one language.
If I had to teach it I would choose Python as a first language
though. The reason is that Python is more structured than Lua,
and also more close to pseudocode. It is a perfect way to teach
algorithms, and you can get up to speed and do real things
quickly with it.

Then I would teach C, because it is still the best way to
learn data structures. I do not think can understand CS if you
do not understand memory management, pointers... Also, Unix.

Then I would teach LISP, the Maxwell Equations of Software.
C makes you understand what you do from the point of view of
the computer, LISP makes you understand what you do in
theory and understand the power of abstraction.

Finally, I may teach something like Haskell. Programmers should
understand typing, the equivalent of homogeneity in math.

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.

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).

-- 
Pierre Chapuis