2012/7/5 Daniel Friesen <[email protected]>: > On Thu, 05 Jul 2012 01:01:13 -0700, Antoine Musso <[email protected]> > 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 > [email protected] > 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. -- Daniel Werner Software Engineer Wikimedia Deutschland e.V. | NEU: Obentrautstr. 72 | 10963 Berlin Tel. (030) 219 158 26-0 http://wikimedia.de Wikimedia Deutschland - Gesellschaft zur Förderung Freien Wissens e.V. Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/681/51985. _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
