C. Daniel Cooper writes:

 > c) subscriber id: This approach assigns a unique identifier to each
 > subscriber and uses that instead of the 'Access value for matching
 > in the callback list. This adds complexity and maintenance concerns,
 > and resists the introduction of a new subscriber into the system
 > -- although I've heard it argued that that is a -good- thing: only
 > "authorized" subscribers will be able to subscribe, by virtue of having
 > been assigned an id.

This is indeed a better design. It is possible to have a fast implementation
to look for the ID (AVL tree for example). More over it is then possible to
have a "readable" log file. For each use of the interface you can log which
client is calling.

 > e) dispatching: This is a more sophisticated approach, wherein the
 > callbacks are mediated via tagged type dispatching rather than by
 > 'Access subprogram values.

Of course this is the design to use with Ada95, as Corey said, it is the
implementation used in OO languages, it works just fine and does not suffer
the 'Access issue you have raised.

Pascal.

--

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595