lua-users home
lua-l archive

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


Hopefully not to start another controversial topic, but I'd be
interested in scheme-like continuations as more general purpose
solution for contiue in loops, which as further possibly could
integrate coroutines into it to keep the language small. Altough I
manage to make small patches to the lua codebase, this is too complex
for me, but it could be a 2 month hack or so what would be the scope
for GSoC.

local var = for k, v in pairs(t) do
 ...bla..
 if condition then continue(var) end
 ..bla...
end

foo = continuation()
code..

anywhere else in the code that can "see" foo, you call,

continue(foo),

to move the stack and program pointer to the point where
continuation() was called, but with possible changed globals, common
locals etc.

A loop like aboth would be made a special continuation point that
continue jumps into the statement, after the initialization but before
the call of next().

On Mon, Feb 21, 2011 at 4:17 AM, Matthew M. Burke <matthew@bluedino.net> wrote:
>
> Google is running summer of code again this year.  The deadline for
> applications is 11 March.
> If anybody wants to put together an application I'd be happy to help.  I've
> been involved with the Tcl community's participation in GSoC for a couple of
> years, so I have some experience.
>
> Matt
>
>
>