lua-users home
lua-l archive

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


I was able to use Lua for ages before copying table references became
an issue (let alone understanding closures and lexical scope). But the
good thing was that I liked it enough to keep using it until I
understood everything. A kid who needs to make a copy of a table
should be advanced enough to be able to understand the difference
between:

b = a
-- and...
b = tableCopy(a)

For the kids who enjoy playing around with strings (ie they enjoy
programming), this shouldn’t be a problem to teach when the time is
right.

On 10 November 2012 06:25, Marc Lepage <mlepage@antimeta.com> wrote:
> For trying to teach concepts of variables etc., I once drew up a little
> Candyland-like board game where the cards, instead of being like "move 3
> spaces forward", were "move forward the number of tokens in the A pile" and
> so on.
>
> An interesting project might be to make a game like that, in Lua, maybe
> using LÖVE, making it nice and colorful.