Modularity

Matthias Andree matthias.andree at gmx.de
Mon Jan 13 14:48:18 CET 2003


Adriano Nagelschmidt Rodrigues <anr at estadao.com.br> writes:

> Hi,
>
> I was reading the bogofilter man page, and it just crossed my mind that a
> single executable is doing too many things. I wonder if splitting basic
> functionality into different binaries wouldn't be a good thing.
>
> Motivation: when you use one of the [nNsS] switches, there's no sense in
> using an algorithm selection switch (eg -f). Right?

Not quite. While -f and -r (Fisher-Robinson) and (Robinson) share their
registration, -g (Graham) uses a different registration procedure, and
the filter algorithm is queried for parameters.

OTOH, these programs share a lot of common code (like the tokenizer,
data base, and recently, MIME stuff), so that we'd exchange like 10
percent of these programs with the other 90% being linked in unchanged.

I wonder if that's worth the effort. It might make the man pages more
concise though ;-)

> bogoclass [-s] [-S] [-n] [-N]
> bogotest  [-g] [-r] [-f] [-l]
> bogolearn # a wrapper that does (bogotest ? bogoclass -s : bogoclass -n)

That's what bogofilter -u (or -u -e) does now.

-- 
Matthias Andree




More information about the Bogofilter mailing list