lua-users home
lua-l archive

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

On 15 December 2011 11:57, steve donovan <> wrote:
> There's a few points like that, where a simple space can make all the
> difference. It's hard to learn to watch out for single spaces ;)

I was going to suggest it might be nice to have a project allowing a
more configurable set of transformations (there is of course MetaLua,
but the fact it generates bytecode limits its usefulness).

Then I took another look at LuaMacro which seems to do exactly what I
want. I rather like the Lua syntax but sometimes it can be just a tad
verbose. I think my customised Lua would have the following:
* Lightweight function declaration syntax (my preferred one is Tony
Finch's proposal
* import statement as defined in moonscript
* Update assignment (i.e. += and so on)

I'm a little attracted to the `print_table :hair, :height` ->
`print_table({hair = hair, height = height})` transformation that
MoonScript provides. Default argument support for functions could also
be handy sometimes.

It seems like all of these should be possible with LuaMacro - I'll
have to investigate futher.