https://bugzilla.wikimedia.org/show_bug.cgi?id=47799

       Web browser: ---
            Bug ID: 47799
           Summary: Scribunto should allow coroutines in Lua
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: Unprioritized
         Component: Scribunto
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---

Scribunto should allow coroutines in Lua. The only explanation
I've found for excluding the coroutine package is that
"No application is known for us, so it has not been reviewed
for security." I would like to address lack of application:

underscore.lua[1] provides an assortment of useful functions
that mediawiki wikis can benefit from having available. It
uses coroutines to implement iter and range functions.

A simple coroutine example:

function range(b,e)
  return coroutine.wrap(function()
    for i = b, e do
      coroutine.yield(i);
    end
  end);
end

for n in range(1,10) do print(n); end

[1] https://raw.github.com/mirven/underscore.lua/master/lib/underscore.lua

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to