From: Carl Parrish Date: 2002-03-20T03:04:48+09:00 Subject: Re: style choice > Interesting -- I'm not as anti-if-modifier as some, but here, maybe > because of the length of the pre-if part, I like the first one better. > > My instincts, such as they are, might lead me to do: > > def degree > if @degree == 0 > @scopes.each {|field| @degree += field.length} > end > @degree > end > > I'm a bit stuck on the "why" part :-) > > > David This is my favorite. I'm just learning ruby so I don't know which is faster or has more "Rubyness" but the first two had me reaching for my reference books while this last one I just "got". Carl Parrish