On Wed, May 16, 2012 at 4:03 PM, Daniel Friesen lists@nadir-seen-fire.comwrote:
On Wed, 16 May 2012 15:52:44 -0700, Max Semenik maxsem.wiki@gmail.com wrote:
On 17.05.2012, 2:36 Jeroen wrote:
Hey,
I am not aware of any guidelines regarding the usage of PHP namespaces in
MediaWiki and di not find any on MediaWiki.org. Not surprising since 1.20 is the first release in which we can actually use it. So I'm curious on peoples thoughts on how to use this new features, if at all, in core and in extensions. As far as I get it, we cannot simply put it into core without breaking compat all over he place, but could gradually introduce it for new components. For new extensions it's a lot easier of course, which happens to be the use case I'm currently facing, and wondering what to best do. MediaWiki\ExtensionName seems like a reasonable NS for extension classes.
Frankly, the namespace syntax in PHP is so atrocitous that I would like to never see namespaces in out code:P Seriously though, I think we should start slowly, maybe not including namespaces in 1.20 and then tread carefully - some extension devs might want to be compatible with older MW versions that support PHP 5.2.
I don't think we should use namespaces at all unless there is a good reason for it.
The only case I think we should allow namespaces in is within a MediaWiki component with a lot of small classes related to the component.
Well namespaces can provide for better organization, readability and dependency tracking among other things. So, it's probably worth investigating this a bit more.
-- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]
______________________________**_________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/**mailman/listinfo/wikitech-lhttps://lists.wikimedia.org/mailman/listinfo/wikitech-l