On Thu, May 13, 2004 at 01:22:26PM -0700, Michael Vanier wrote:
> Read the book "Programming in Lua" by Roberto Ierusalimschy:

I have not personally read the book so I can not comment on it other than
I've heard others say it is good. However, also see 
<http://lua-users.org/wiki/LuaTutorial>. (I had no trouble picking up Lua
just be scanning through the official reference manual. Contrary to what
some have said, Lua _is_ really easy to get started with in my opinion. 
Much simpler than Python, even. There are a few new concepts, some seldom
found in other imperative languages: functions are true first-class values,
function closures, coroutines. These should not be hard to pick up and really
make life a lot easier. Of course, it maybe should not be required to know
these for configuration, and this has been changed in Ion3.) 

> It's a very good, thorough tutorial on the language.  I'm not exactly blown
> away by Lua -- I don't see what it provides that e.g. python doesn't (aside
> from a small footprint), and some of the design choices seem weak, but
> there's nothing really confusing about it. 

Some facts and opinions, much but not all of which I can agree on, may be 
found at <http://lua-users.org/wiki/LuaVersusPython>. I'd like to add 
'overloading operators to do two completely different things' to minuses 
of Python. ('+': add or concatenate, '%': remainder or sprintf. The last 
makes me puke.) Also I'd like to emphasise how awfully complicated and
bloated the Python/C API is compared to Lua's, which rivals OpenGL in
elegance. There are a few details related to handling of errors that might
be better implemented otherwise, but would not affect the set of functions
in the API. Of Lua's features, perhaps the most annoying is accessing of 
non-existent variables not failing until the value is tried to use. But
there are (consistency-related) reasons for this. The fact that 
'if 0 then ... end'  will succeed may be a bit confusing to new users who
may be used to this abuse of zero, but is infact quite a good design choice
IMO. (Only 'nil' or 'false' will make tests fail.)

> You may be getting confused by
> some of the syntactic sugar, which is indeed odd (e.g. "foo{bar=1, baz=2}"
> being sugar for "foo({bar=1, baz=2})").

This syntactical sugar is quite nice for simple configuration files.
Ion's may use programming language constructs too much to make into that
category.

> I'm not sure that "reaching more users" should be the goal of Ion.
> Reaching more like-minded users is more like it.  

The goal of Ion is to boldly go where no window manager has gone before :). 
The number of users is secondary to that. How many are there anyway?

-- 
Tuomo

Reply via email to