From: Gavin Sinclair Date: 2002-12-01T19:48:23+09:00 Subject: Re: Ruby Document From: "Bill Kelly" > > In my own code, for what it's worth, I tend to use symbols in > places where I might have in other languages used an integer > constant to represent a (certain kind of) recurring named type- > value. Such as: > > NOUN = 0 > VERB = 1 > ADVERB = 2 > ADJECTIVE = 3 > > Instead, in Ruby, I'll just go: if word.type == :noun .... > I would do NOUN = :NOUN VERB = :VERB ... if word.type == NOUN ... Your way is prone to evil spelling mistakes! Gavin