Re: globals vs parms
David Relson <[email protected]>
| Newsgroups | gmane.mail.bogofilter.devel |
|---|---|
| Organization | Osage Software Systems, Inc. |
| Message-ID | <[email protected]> |
On Sat, 23 Apr 2005 02:22:55 +0200 Matthias Andree wrote: > David Relson <[email protected]> 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! _______________________________________________ Bogofilter-dev mailing list [email protected] http://www.bogofilter.org/mailman/listinfo/bogofilter-dev