Re: [AD] Platform specific functions in A5 [was Re: Windows Addition for Message Parsing]

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


On Wednesday 08 October 2008 02:11:14 pm Elias Zacarias wrote:
> >> We add that functionality to the Windows port. Ok, fine. But what
> >> makes Windows so special that we add it there?
>
> Question is, why should we NOT add it if it enhances the functionality?

Because it only enhances functionality for some people (agruably not even the 
majority of people using Allegro).

> Ok, the function won't work on other systems, but, does other OS
> require you to "catch" "messages" to add functionality? I'm pretty
> sure there are more libraries for unix/OSX that can coexist with
> allegro and may add things that in windows could be only done by
> parsing messages.

So even more platform specific code? "For Windows, use this Allegro 
functionality. For other OSs we have to use an external lib." Isn't the point 
of Allegro to provide cross-platform capabilities, without the user having to 
directly use platform-specific libs?

Besides which, adding a method to override the platform-specific message 
system in A4, IMO, was a big problem, since you couldn't do it on other 
platforms.

> Well, it's most likely that OSX and X11/**nix and other OSes have
> different messaging systems (if any). Even when I'm not a
> windows-fanboy I still have to develop for windows, like it or not.
> I've not run across any customer who request a linux development yet.
> They may exist, sure, but let's face it's not the norm.

Just because it's not the norm isn't a reason to not try to do it. Using Linux 
isn't the norm.. programming for Linux isn't the norm.. perhaps we should 
just forget the Linux port of Allegro if something becomes the tiniest bit 
difficult to manage? :P

> It's also beyond the purpose of the library to provide support for
> unexistant things. I mean; "messages does exist in windows", they may
> not exist on other platforms (i.e: DOS), does that mean that you will
> implement some "message system emulation" or "unix-to-windows
> messaging conversion" JUST for providing that function to ALL ports of
> allegro? That's beyond scope and purpose.

It's better to have a cross-platform function that no-ops on other platforms, 
than a platform-specific function that's not available on other systems, IMO.

> I understand your point Evert, the feature IS platform-specific

Does it have to be, though? If it can be exposed in a platform-neutral way, 
and be useful on multiple platforms, IMO, we should try to make it platform 
neutral.

FWIW, multiple mice is supported by X11, AFAIK, so it's not platform specific 
and shouldn't require platform-specific code to use. If someone needs to 
manually parse platform-specific window messages to do it in Windows, it's 
definitely a candidate to make an API for it in a cross-platform way.




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