2012/7/5 Daniel Friesen lists@nadir-seen-fire.com:
On Thu, 05 Jul 2012 01:01:13 -0700, Antoine Musso hashar+wmf@free.fr wrote:
Hello,
PHP 5.3.0, released in June 2009, introduced namespacing, a feature we have never used yet since we were still supporting 5.2.
Jeroen submitted https://gerrit.wikimedia.org/r/14181 which use namespaces. Since that is, to my knowledge, the first patch that introduce namespace, I am opening this thread so we discuss about namespace introduction in MediaWiki.
PHP doc http://php.net/manual/en/language.namespaces.php
Thoughts?
I maintain that use of namespaces should be on a case-by-case basis. Only used if there's a significant advantage to using namespaces for some code. eg: A component with a huge pile of small classes for pieces of the component.
In this case, I don't see a good reason to use a generic MW namespace.
-- ~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-l
By all means, GO for it at least in extensions. Namespaces are awesome there since they can spare you a lot of prefixing extension classes. Have not made my mind up about core though, there might be valid reasons why not to use them there.