[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: help to (slightly) modify Lua interpreter
- From: steve donovan <steve.j.donovan@...>
- Date: Fri, 6 Nov 2009 13:54:38 +0200
On Fri, Nov 6, 2009 at 1:14 PM, Francesco Abbate
<francesco.bbt@gmail.com> wrote:
> thank you very much for your suggestion. Actually I've got exactly the
> same idea this morning, that's not bad, may be I'm going to adopt it.
I wonder about all the little tables created by A[{i,j}] ? Would it
hurt indexing much? Only one way to find out!
> Otherwise, if I understand well, everyone here is saying loudly:
> you don't need to change Lua, please keep your dirty hands away from it!!
People here are actually relatively relaxed about modifying Lua syntax
[1], but VM compatibility is important. (OK, that issue is now a bit
confused by LuaJIT 2) However, modding via token filters or Metalua
_is_ easier than fooling with the parser.
> For the latter remark, this is already the case as I've adopted the
> LNUM patch to support complex numbers and the Metalua notation for
> direct, expression-based, functions (like |x,y| x+2*y).
Well, strictly speaking you have a subset, which will not break any
normal Lua. The |x,y| patch is definitely something that mainline Lua
could do with, since it fits with the philosophy of simple,
well-understood syntactical sugar and makes the functional style less
'noisy'.
steve d.
[1] Compared to (say) C++. That is only done by committees that sit
for decades ;)