globals vs parms

David Relson relson at osagesoftware.com
Sat Apr 23 04:18:16 CEST 2005


On Sat, 23 Apr 2005 02:22:55 +0200
Matthias Andree wrote:

> David Relson <relson at osagesoftware.com> writes:
> 
> > Adding a parameter that must be passed through multiple functions to
> > get where it's needed is not my idea of the right way to do things.
> > Straightforward flag variables are easier to deal with.
> 
> The general problem with globals is that they aren't visible from the
> place where they're called, hard to see where they're used, and harm
> (re)usability of the code.
>

I can live with those problems.  Transaction support requires that
there be a unique database environment.  For bogoutil, which only works
with one database, uniqueness is guaranteed.  Uniqueness also doesn't
matter if transactions aren't being used.  

You don't like my lightweight solution for determining if the
uniqueness check is needed.  If you've got a comparably simple way of
doing the check, let me know!



More information about the bogofilter-dev mailing list