[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Metaprogramming
- From: Carlos Pita <carlosjosepita@...>
- Date: Fri, 4 Jul 2014 14:45:58 -0300
as I'm coming to lua from the lisp/scheme world, metaprogramming
facilities are at the top of my checklist. Also, since lua is
minimalistic and provide powerful and generic building blocks
(resembling scheme in both aspects) metaprogramming is synergic with
the language design principles.
I know of metalua, which is a compiler, and of luamacro, which is a
preprocessor. But, as a newcomer, I'm still unable to completely grasp
many details about versions, interoperability, tooling, and the like.
So some questions are in order:
1) As metalua produces bytecode and luajit doesn't read any bytecode
but its own, is it possible to combine metalua with luajit somehow? Is
it possible to use metalua as a preprocessor? If it is, are there
convenient tools to do this or will I instantly become a maverick
(which I don't want at all)?
2) Is there any editors/ides supporting syntax extensions out of the
box? I mean editors that become syntax-extension aware without a lot
of effort from the user.
3) Up to this point my plan is to:
i) Use luamacro, as it produces standard lua source code, which
makes it more interoperable with other tools.
ii) Use scintillua (inside textadept) to quickly hack new syntax
constructs support using a bit of lpeg.
What do you think of this approach?
Any informed opinion will be very welcomed.