On Jul 4, 12:08 ¨Âí¬ Òïâåòô Ëìåííå ¼óèïòôãõô®®®Àçïïçìåíáéì®ãïí¾ ÷òïôåº > On Sun, Jul 3, 2011 at 5:43 PM, John Feminella <jo... / bitsbuilder.com> wrote: > >> Even so it would be good to know the general criteria to consider. > > > Conceptually, I like to use these rules of thumb (I think Jim Weirich > > noted it originally, but I am not sure): > > > 1.) If the content and exact sequence of characters is the important > > part, use a string. > > > 2.) If the identity is the important part, use a symbol. > > I use a different rule of thumb which has been circulated before as > well - I can't really remember who came up with this. > > 1. If the set is not fixed (typically because it depends on input > obtained from somewhere) use String. > > 2. If the set of values is fixed (typically because the program > includes just a fixed number of keys) use Symbols. > > According to that standards Fileutils should really be using Symbols > as keys and not Strings since OPT_TABLE is completely used internally > only (contains valid options of methods). > > Btw, if at all conversion between the two should be employed I'd do it > as part of input processing. ¨Âèéíåáîó¬ ôùðéãáììù¬ éæ ùïèáöå > configuration file which may select a few items then a conversion from > String to Symbol would be part of the process which reads the > configuration file. ¨Âîôåòîáìì÷ïõìíáëå ôèðòïçòááì÷áùó ÷ïòë > with Symbols. Thanks robert (et al.). Makes perfect sense. If my current patch is accepted I will make a new one using symbols.