[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [announce] Metalua 0.3: Lisp-style metaprogramming for Lua
- From: Fabien <fleutot+lua@...>
- Date: Fri, 13 Apr 2007 14:20:05 +0200
The version 0.3 of Metalua is available for download. It features an
improved compiler, better doc, new samples, new website.
http://metalua.luaforge.net
Metalua is a compiler, backward-compatible with Lua 5.1, which
supports compile-time meta-programming a.k.a. Lisp-style macros. It
allows to extend the language in almost arbitrary ways, both syntax
and semantics wise, at runtime, from within Lua. The compiler itself
is entirely written in Lua 5.1, borrowing significant portions of code
from project Yueliang.
Among new stuff of interest, you'll find in the extension samples:
- Quick-n-easy syntax sugar: new operators such as +=, continue, C
ternary choice operator... Those which aren't implemented are
generally trivial to add.
- A `pythonic' lexer extension, which makes Lua group statement blocks
according to indentation.
- Dedicated syntax for class-based OO and exception handling.
- List syntax extension:
* lists by comprehension (x = {i for i=1,100,10 if i~=50}),
* sub-sampling (y = x[1, 3, 5 ... 10]),
* multi-returns in the middle of list constructors
(x = {f()..., g()..., h()...}).
- hygienic macros (very alpha)
And the `old' stuff from 0.2: pattern matching, runtime type-checking,
gotos (whose interaction with closures has been fixed), infix function
calls, short lambdas... A detailed view of all provided
sources can be checked at http://metalua.luaforge.net/src/index.html.
There are still many things to do: refactoring & cleaning, more
samples, new features... don't hesitate to contact me if you feel like
working on it.