What is the problem with the ".ext" part?
1. It adds unnecessary complexity both in the extension (need to init mw.ext if it doesn't exist) and more important - in its usage when the Lua extension is invoked (longer names) (there is very small risk of name collision - mw.ModuleA and mw.ModuleB are unlikely to clash as different extensions, and mw.ModuleA and mw.FUNC are unlikely to clash because function names https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Base_functions are usually verbs and extensions https://www.mediawiki.org/wiki/Category:All_extensions are usually nouns) 2. Practically the convention is to not use mw.ext - the convention (based on most of the Lua code - e.g wikibase) is to not use mw.ext
What is the benefit of moving existing code that is so heavily used?
consistency and alignment to some code convention (2). [keeping backward compatibility can be with mw.wikibase=mw.ext.wikibase with deprecation notice] If we believe ext is good convention we should drive to align it and at least to allow usages https://www.google.com/search?domains=wikipedia.org&q=site%3Awikipedia.org+"mw.wikibase" to align to that convention. (google counts 3K usages - if we don't fix it, it will be much harder to fix it later) if we don't believe this is good convention, we shouldn't impose it on new Lua extensions.
Thanks, Eran
On Mon, Feb 4, 2019 at 4:13 PM Thiemo Kreuz thiemo.kreuz@wikimedia.de wrote:
[…] I think mw.ext.EXTNAME should be avoided […]
Can I ask to provide arguments that help others understand this opinion better? What is the problem with the ".ext" part?
[…] or we should reject this proposal and open phab ticket to wikibase
to change mw.wikibase to mw.ext.wikibase everywhere […]
How is this an unavoidable consequence of deciding on a standard new code should follow? What is the benefit of moving existing code that is so heavily used?
Kind regards Thiemo
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l