On Fri, 16 Jul 2004, John Siracusa wrote: > > Let me cut off this line of discussion, because I really, really, really > > hate this style of dual-purpose methods. The reason I dislike it so much > > is that it's impossible to distinguish between a mutator and an accessor > > that accepts arguments to affect what it returns. > > It's not "impossible", since you can always make up some rule to distinguish > the two (e.g. a single argument means set, name/value pairs mean define what > to return).
I meant impossible without reading the docs. > Anyway, what percentage of accessors take "arguments to affect what they > return"? If you want to return different kinds of things, you should make > different accessors, IMO. Well, you have to balance few methods/many arguments versus many methods/few arguments. For example, having a different ymd() variant for every possible separator character would clearly be wrong. -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/