[MediaWiki-l] Lua/Scribunto

Derk-Jan Hartman d.j.hartman+wmf_ml at gmail.com
Tue Jul 17 20:43:18 UTC 2018

Maybe you missed that table.foo (and similarly string.foo) is the prototype
for any someTable, which thus automatically has someTable.foo(). And that
someTable:foo(args) is just syntactic sugar for someTable.foo( someTable,
args ) ?

It's one of those weird Lua quirks


On Mon, Jul 16, 2018 at 1:05 PM Stephan Gambke <s7eph4n at protonmail.com>

> I have been playing with Scribunto recently and the one thing that struck
> me as odd was that Lua has a number of methods like table.foo or
> string.foo, but I did not find any factory module leveraging these methods
> to provide someting more intuitive like someTable:foo or someString:foo.
> Is it just not worth it or did I miss anything?
> Stephan
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

More information about the MediaWiki-l mailing list