Namespacing Collection

Ian Monroe ian at monroe.nu
Mon Dec 8 06:28:40 CET 2008


On Sun, Dec 7, 2008 at 12:06 PM, Leo Franchi <lfranchi at kde.org> wrote:
> hey guys,
>
> i'm in the process of adding Growl support for os x (growl is the
> standardized notification system for os x, think the OSD on steroids),
> and as this is a os x class, it requires the Carbon.h header (os x
> headers). anyway, Carbon.h contains a typedef Collection, non-
> namespaced, that conflicts with our own Collection.
>
> do people have technical problems with me namespacing the Collection
> stuff into its own namespace? i'm thinking Amarok::, but don't really
> know what the best name would be.
>
> another options is renaming Collection itself to e.g. MusicCollection.
>
> thoughts?
>
> leo

I've seen apps (remember CampCaster Mark? :D) that namespace
everything. So we'd put everything into an Amarok namespace. We could
use the "using namespace" except in files where we have such a
namespace conflict.

It might be a good idea, since this isn't the first time this has
happened. There was that similar issue with LastFm code. Or maybe its
going overboard. If thats the case I'd prefer just putting Collection
into the Amarok namespace, rather then use a kind of silly name like
MusicCollection.

Ian


More information about the Amarok-devel mailing list