On Tue, Feb 25, 2014 at 5:02 PM, Matthew Flaschen
<mflasc...@wikimedia.org>wrote:

> On 02/19/2014 05:49 AM, Antoine Musso wrote:
>
>> * namespaces : we did not see a good use case for them
>>
>
> It's useful for extensions.  That way, an extension doesn't have to worry
> about the names of core classes, or future extensions, and it doesn't have
> to have prefixes in the class name itself.


Is there a difference between Extension\ClassName and Extension_ClassName,
collision-wise? i.e. if two extensions both use "Extension" as a namespace
and define "ClassName", what happens?

Namespaces do have opportunity to allow for shortened references within the
extension. Although potentially with confusion, particularly if the
shortened reference is hiding a "global" class of the same name (e.g.
aliasing Extension\User to User).

The status quo has the advantage of not looking weird with backslashes ;)


-- 
Brad Jorsch (Anomie)
Software Engineer
Wikimedia Foundation
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to