lua-users home
lua-l archive

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

2009/11/6 Mark Feldman <>:
> Can you wrap the indices into their own seperate table, i.e. m[{1,2}]? The
> code below uses only a single __index/__newindex handler but it works for an
> arbitrary number of dimensions and could be modified to pass control down
> through the heirarchy.

Hi Mark,

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.

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!!


Well, I can understand that you want to preserve the original form of
Lua. From my point of view I see
- a technical difficulty, since a VM modification will affect many
parts of the code
  (I guess)
- the result, if I succeed, would be basically incompatible with
existing Lua binaries.

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). So I don't
care to break further the compatibility since it is already broken.
Please note that complex number are very important in many domains and
Lua does not support them natively: this is clearly a Lua limitation
and the support as user-defined data is clearly sub-optimal.

So from my point of view I just see a technical difficulty in doing
the change of the VM.

In any case, I would appreciate a lot to have anyway some hints about
how should I change the VM if I decide to do so.

I understand all your remarks against Lua modification and I will keep
your remarks in mind but I hope that you will give me some help

Best regards,