[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
**Subject**: **Re: Lua language extension for complex number and vector values**
**From**: Francesco Abbate <francesco.bbt@...>
**Date**: Tue, 5 Apr 2011 09:36:07 +0200

2011/4/4 Xavier Wang <weasley.wx@gmail.com>:
> All you need is to make "stack range" a primitive type just like table.
> i.e. the right part of
> local x, y, z = 1,2,3
> become a "ninth type" in lua.
> this type used to:
> - pass argument
> - pass return values
> - multi-assignment
> if we use special sign () to show this type:
> local n = (1,2,3) -> means local n_1, n_2, n_3 = (1,2,3)
> print(n[1]) --> means print(n_1)
> local m = (x = 1, y = 2) -> means local m_x, m_y = 1, 2
> print(m) --> means print()
Hi Wang,
thank you for the proposition, this is actually the Lua extension I
was thinking about! The only difference is that I was thinking to use
[] instead of () to group the variables.
For the other side I'm not sure if this proposition is really sound
(may be yes) and I'm not sure of the extent and implications of its
possible integration in Lua.
I believe we can keep open this subject and keeping thinking about it.
It would be nice to have a proof-of-concept implementation based on
Lua 5.1. It can be challenging to do but it could be the best way to
show that it can really works.
Unfortunately I don't have the time to do that myself for the moment
so I fear that I will put this idea in stand-by for a while.
Francesco