Re: [AD] namespace collision

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 08 Aug 2001, Sven Sandberg <svsa1977@xxxxxxxxxx> wrote:
> Peter Wang wrote:
> > OTOH maybe the default should be _not_ to #define the short names.
> 
> Then all old programs will be broken until their author update them. 

Yes, but just a little #define..  or the reverse of Laurence's
earlier idea.  i.e. the "real" API exists in `allegro4.h', but old
programs include `allegro.h', which includes `allegro4.h', then has
compatibility #defines.  This is not a serious proposal.

> But if we change this in a WIP people will have some time to fix
> their programs. And we can also use Matthew's idea of compiling two
> versions of the library, I think that sounds good.

I didn't like that idea.

Now I'm thinking we should put this whole thing aside for 'Grozilla
(a.k.a. Allegro 5.0), where we ignore backwards compatibility and
destroy really International Style glass boxes (they're ugly anyhoo).

> It would also solve the
> problem with user programs defining eg. clear().

Meanwhile, back in the Real World...

Can I do something about `clear'?  I like the name `clear_bitmap'
(which, in a Freudianish way, I've typed before).  Here's what I'm
wanting to change:

(1) `clear' becomes `clear_bitmap' in source.
(2) `allegro.h' gets "#define clear(bmp) clear_bitmap(bmp)".
(3) You can switch off (2) with a #define before #include <allegro.h>.
(4) People who take the address of `clear' need to use
    `clear_bitmap' instead.  People who have member functions called
    `clear' need to do (3) and use `clear_bitmap'.

Please?



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/