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

DJ

On Mon, Jul 16, 2018 at 1:05 PM Stephan Gambke <[email protected]>
wrote:

> 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
>
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to