>>>>> "RS" == Robert Story <[EMAIL PROTECTED]> writes:

RS> D'oh!  Note that this patch doesn't include moving the 3 required
RS> helper modules, but simply deals with moving the explicit library
RS> init call from the agent library into the application.

I actually disagree with this solution on a number of points:

1) architecturally we're putting some helpers outside the helpers
   library (and really, they're more "implementations" rather than
   "helpers" since they don't really "help" anything but the main
   agent).  The separation of location seems confusing to someone
   looking at the code fresh, however.

2) we're now requiring the application to call init_helpers instead,
   which:
   a) breaks backwards compatibility
      [which we can do, but we should do so carefully]
   b) increases the likely hood of a application writer making a
      mistake

3) Though functional:

   +                        (void *)'help');
   +    if ( (void*)'help' != clientarg)

   Those two patch pieces are confusing to readers and it could be
   done in a cleaner way that would offer less confusion.

RS> The other option would be to:

RS> - very carefully examine every public/exported function in every
RS>   helper which isn't moved into the agent library

RS> - determine which functions expect/require that the helper's init
RS>   function was called

RS> - modify those functions to conditionally call the helper's init
RS>   function if a static need_init flag is set.


That would work as well, but requires significant analysis, assurance
that we get it right, assurance that we get it right for new helpers
in the future, assurance that we get it right for new functions to
existing helpers in the future, ...



I have to sit back and think: who is benefiting from all of this work?
How many people?  Is it a lot of people?  A few?  Is it even non-zero?
How many people are really going to be implementing an agent without
any helper functionality in it?  Is it possible, yes.  But half of the
point of the helpers is to reduce code and to reduce work that people
need to do.  Is the savings on removing the helpers library that
grand?

In the end, I still think that moving libhelpers -> libagent entirely
is not only significantly cleaner, it's far less error prone for both
us and users, and 99% of the time going to be what the users need in
the first place.  I have yet to be convinced otherwise.
-- 
Wes Hardaker
Sparta, Inc.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to