> So you'd like to ditch the giant switch statement and replace it with a
> function table instead?  A vector indexed by function number or a hash_map
> perhaps?  This is easy enough to implement.

And could have some more advantages. You could 'register' new functions
at run time. You do not need a monolithic 2MB+ binary when you
use only 10% of the functionality. 
Just load 'modules' dynamically on demand...

I'd even drop the kb_action enum and identify actions by name (i.e.
a string instead) The speed penalty shouldn't be that high (especially
when going from the linearly searched 'switch' statement to a map)
and it would break quite a few dependencies...

Andre'

PS: If you trust your stomach, go and have a look at src/.deps ;-)

--
André Pönitz ......................... [EMAIL PROTECTED]

Reply via email to