Original Post
Kind of a trivial issue, but I'm writing a library function and I'd like some advice on the best implementation. The function applies effects to a target. There are 40+ applicable effects divided into 4 types of effect. My question is, which of the following is preferable? - a) one "apply effect to target" function with parameters for effect, effect class and target, or b) four "apply effect to target" functions (one for each class of effect) with parameters for effect and target. I expect that both options will be equally easy to maintain, though option b may be more readable. The library will be used and modified by novice coders so the main concern is ease of use.