lua-users home
lua-l archive

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


Hi,

>Coco's probably the best solution, but if you prefer to keep ansi c there is the 
>http://lua-users.org/wiki/ResumableVmPatch.  Or perhaps do away with the 
>metamethods idea and modify c side, but it still won't be easy/neat. Good luck :).

I prefer coco to ResumableVmPatch. Because (1)ansi c is not a aim for me at all,
and the detail of an improved coroutine is almost orthogonal to future, and (2) a 
JIT-able future is more desirable :)

I have the following design decisions:
(1)compatibility with existing lua code. exising lua code should run as expected 
   with future variables. There's no need to distinguish between a future and others 
   most of the time.
(2)compatibility with existing c code. extension modules need not to be modified.
(3)a clean and non-intrusive implementation

Actually I have done some trivivial work and got a bit familiar with lua source code.
I find it very difficult to get a non-intrusive implementation. I have to modify
everywhere when a varialbe value is used, because I don't see there's an abstraction
with which I can intercept an access to a variable and distinguish between reference
passing or content reading/writing. Is there any suggestion?