lua-users home
lua-l archive

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

As said, it reallly depends on what you want to teach, and in what environment.

The core skill in programming is problem decomposition. No matter what language you'll have to break the problem down into parts (a skill that helps in real life as well, yay).
In order to learn this, I believe it's a good thing to get as many tricky parts out of the way as you can, so people can get quick results to keep them motivated. When decomposing problems becomes second nature you can worry about the trickier concepts (there's little point talking about member variables when the concept of a variable, let alone local vs global) is still abstract.
Pointers, type safety, constness, classes are in my opinion great concepts, but better left for later. They unnecessarily complicate the shortest route from problem to tangible solution.

Problem decomposition is a skill that is hard to teach, as there is no single way from problem to solution. Therefore it's good to give people the chance to explore and find their solution. Any barrier that's put in the way in way of language complexity will hinder that process.

People love accomplishments. Seeing something move on the screen because you told it so is awesome. For that reason I believe Love2D is a great tool to get people comfortable with problem solving. It uses Lua and is quite accessible. 

A language is just a language, when you know one, it's pretty trivial to switch to another (not taking functional languages into account here). Yes, pointers are tricky for someone who is used to garbage collection, but even the most experienced C coder still has the occasional memory leak, null pointer dereference or buffer overrun. In the end it's just a slightly different syntax for transcribing the decomposed problem, not a paradigm shift.

As for OOP, odds are that when people are honing their skills in decomposing problems, the situation arises where they say "sheehs, I have a lot of duplication in my flat file top-to-bottom code" - functions are introduced. 
Then, at one point people say "sheesh, these things need the same functions but only this tiny part differs for all of them". Then, perhaps, classes are interesting.

Problem decomposition is the core skill. Exciting results with the least roadblocks can keep motivation up.

I believe Lua is great for that.