On Wed, 16 May 2012 15:52:44 -0700, Max Semenik <[email protected]> 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.

--
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to