Re: [AD] AL_ prefix clashes with OpenAL

[ Thread Index | Date Index | More Archives ]

On Jul 7, 2007, at 3:47 PM, Elias Pschernig wrote:
One point we are currently discussing in the meeting is the clash of the
AL_ prefix for Allegro 5 with OpenAL. See for example here (a header
from openal): fidADF1216C9DD667D79D118F03D4D441F5689606EA.aspx?s=al.h

The prefix for functions, al_, is not used by OpenAL, so no problem with that - but there's a high probability a type name or constant name will clash with one used by A5 (and they might add further stuff, not caring
about us).

I know this came up in the past and the conclusion then was that namespace collisions were unlikely to happen because of differences in the naming scheme. Where we simply mistaken about that or has something changed? Sorry about the meeting, by the way. I came back from a trip late on friday and was thus busy with other things on saturday.

* keep AL_ and al_ and try to not clash somehow (we *do* want OpenAL to
be used together with Allegro, most likely it even will be one of our
sound backends)

If feasable, this would be my choice. Is there a way to make sure such a clash does not happen?

* keep al_, but use A_ ALG_ ALX_(Allegro eXtended) A5_ ALLEGRO_ or
something instead of AL_

In that case, I'd go for ALLEGRO_, though I really don't want to have to type things like ALLEGRO_GFX_AUTODETECT | ALLEGRO_GFX_WINDOWED | ALLEGRO_GFX_32BPP, so maybe it's not such a great idea.

* replace both al_ and AL_ to something like above

Keeping them the same has advantages, but to my mind it's not strictly nescessary. It's not even nescessary that types and macro's follow the same AL_ naming scheme (they're different types of objects), so we could have AL_BITMAP and ALLEGRO_GFX_OPENGL, for instance.
Thinking as I type here.

One idea also was to change the name of Allegro itself to e.g.
AllegroPro, then use ap_ and AP_ prefixes.

Don't like this one (well, I don't like the name AllegroPro anyway), also because it doesn't actually solve the real problem.

We couldn't really decide this, so asking here instead. (Myself, I'm
leaning to a5_ and A5_ currently.)

That's probably the least painful solution, though I personally dislike the appearance of the number "5" as part of the name.


Mail converted by MHonArc 2.6.19+