lua-users home
lua-l archive

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

On Tue, 2005-01-18 at 21:30, David Given wrote:

> Closures are definitely the way to go for this sort of thing. They make life 
> *so* much easier... the GUI system we're implementing where I work is mostly 
> written in C++, which doesn't have closures, and uses function callbacks 
> instead. These are fine for standalone applications, but not terribly 
> friendly for objects; you have to implement a static function that casts the 
> callback's user pointer to the appropriate type and calls a method on that. 

You could have a look at Felix then. It has closures and microthreading,
which is ideal for a GUI. Microthreading (coroutines) lets you 
*read* events instead of writing callbacks (the compiler control 
inverts reads to callbacks behind the scenes, so the implementation
is event driven, but the programmer writes algorithmic code).

Also built in pattern matching, regexps, GLR parsing,
and a few other neat things.

Felix generates C++ and has heavy support for embedding 
and being embedded in C++.

Oh .. and a Lua binding is now a standard part of the distro,
and the Lua CAPI, compiled as C++, is part of the runtime library.

John Skaller,
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language