Re: [AD] Prefixing

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


On Thu, 2004-07-22 at 00:14 -0700, Chris wrote:
> guilt wrote:
> > I agree with Elias more.
> 
> I suppose it actually depends on what you mean. Like if you have 
> al_get_keys, would that give you the key array as Allegro has it or just 
> a copy of it that you need to regularly update? The former I'd be fine 
> with, since it would be like having a global key array, except you 
> define it yourself. The later I'm not okay with, since it'd be a 
> throwback to polling and be a waste of CPU time and memory.

My idea was neither. Just "rename" key[x] into al_key(x). Global
variables feel somehow hackish, compared to an API without them. No
functional or performance difference. mouse_x would be al_mouse_x().
Just a bit of cleaning the API. Of course, if only a minority sees
having no global variables as an improvement, it won't be done.

I wrote the ideas I had so far to Tomasu's wiki btw. - we can use it to
write down the ideas resulting from discussion here, or also alernate
positions for things where there's no agreement, I guess:

http://awiki.strangesoft.net?AllegroAPIDesign

Everyone is welcome to add comments or more ideas for API cleaning.

-- 
Elias Pschernig





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