
preilly at wikimedia
May 16, 2012, 4:10 PM
Post #4 of 15
(218 views)
Permalink
|
On Wed, May 16, 2012 at 4:03 PM, Daniel Friesen <lists [at] nadir-seen-fire>wrote: > On Wed, 16 May 2012 15:52:44 -0700, Max Semenik <maxsem.wiki [at] gmail> > 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 [at] lists > https://lists.wikimedia.org/**mailman/listinfo/wikitech-l<https://lists.wikimedia.org/mailman/listinfo/wikitech-l> > _______________________________________________ Wikitech-l mailing list Wikitech-l [at] lists https://lists.wikimedia.org/mailman/listinfo/wikitech-l
|