From: Pit Capitain Date: 2005-08-03T02:24:31+09:00 Subject: Re: enum collection of constant values Jim Menard schrieb: > Pit Capitain wrote: > >> Jim Menard schrieb: >> >>> Use symbols. They are similar to strings, but every use of the same >>> symbol uses the same value, and they are very compact. >>> >>> state = :none >>> state = :good if all_is_well >>> # ... >>> state = :logic_error >> >> ... and for a set of values use the class Set. > > I'm not sure I understand why you suggest the use of Set. Am I missing > an advantage over the user of symbols? I'm sorry that you didn't understand me. I also think that having numbers behind the names isn't necessary at all and maybe even misleading, so I also would suggest to use symbols. But if you read the original message, Garance wanted to be able to build sets of his constants and combine the sets with an "or" operator. For this I suggested use sets (of symbols). Regards, Pit