in reply to Encapsulation and Subroutine redefined warnings

To expand on iburrell's reply, what you're doing looks and smells very much like filters. You have a thing and you pass that thing to various handlers / processors / filters / whatever. Each filter will take the thing and (possibly) do an action on it. Once the filter is done acting, it will hand the (possibly) modified thing to the next filter.

Implement them as objects. For one, you don't have the namespace collision problems. Plus, you can now have filters inherit from each other, which becomes really neat.

------
We are the carpenters and bricklayers of the Information Age.

The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

  • Comment on Re: Encapsulation and Subroutine redefined warnings