RE: [AD] 4.3 graphic drivers

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


On Thu, 2005-11-10 at 21:28 +0000, gil04@xxxxxxxxxx wrote:
> Quoting Robert Ohannessian <ROhannessian@xxxxxxxxxx>:
> 
> > I seem to remember a couple of threads on the topic, a few years back...
> > 
> > I personally would vote for strings instead of #defines. This code
> > doesn't need to be fast, since it's done just once at init time.
> 
> 
> are strings any more safer ?
> they offer potential for more problems.
> i thought the point of structured programming languages like C was to make
> things more robust.

Bob's idea clearly is the most robust - even if the driver was compiled
against another version of Allegro, it would still work (since we build
the vtable at runtime out of name strings and versions.. so Allegro
always has complete knowledge).

Evert's way allows binary compatibility, as long as prototypes don't
change, and no crucial new entries are added.

With Peter's way, the driver needs to be compiled against the new
Allegro version if the vtable entries change. It's not very different
from the current system in how it works, but cleaner than the completely
static vtables we have in 4.2.

[Did I get it right?]

-- 
Elias Pschernig





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