lua-users home
lua-l archive

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



> 
> Vijay Aswadhati wrote:
> > FWIW, count my voice as well speaking up for coroutines as a first class
> > feature of the Lua language. And while at it, it would be super to
> include
> > the work of (Mike Pall and Eric Jacobs) on this subject into the core
> > language core as opposed to being a power patch.
> 
> Well, yes and no. I do not think that my proof-of-concept implementation
> of true C coroutines with machine dependent stack switching is really
> feasible. As I pointed out in another message I encountered too many
> difficulties porting it and there are other issues, such as the stack
> allocation problem.

I am aware of that and hence I included Eric Jacobs work. However I did not
follow up on what the status of his patch.

> 
> However I would very much like to see something similar to Eric's approach
> ( http://lua-users.org/wiki/ImprovedCoroutinesPatch ) in the Lua core.
> I even thought about porting it to Lua 5.1 ...
> 
> But I'd like to have feedback from the Lua authors on this issue first.
> It's very hard to maintain this as a separate patch, since it affects
> many areas of the Lua core. Sooo ...
> 
> Is Eric's approach something you would like to incorporate into the Lua
> core?

Ideally I would like the plausible performance improvements that come with
the 'C' coroutines and the convenience of such coroutines available
seamlessly in Lua (the scripting environment)

> If yes, is there anything that needs to be modified in your opinion?
> Do you want us to port it to 5.1 or do you want to integrate it yourself?

To be honest I have not had the chance to play with both of these patches
and hence I cannot offer any comments other than to suggest that first class
features of any language should be part of the core distribution fully
integrated and tested. I use the term 'first class' in a similar vein as the
statement 'Functions in Lua are first-class values...' (PIL:
http://www.lua.org/pil/6.html)


--v.a