From: Trans Date: 2006-10-08T19:25:17+09:00 Subject: Re: nil being empty Mark T wrote: > Responding to empty? implies that a response to full? is valid. > Which is unlikely with a nil object. > The fact that nil exists is fascinating. > Stepping back one step, I do not like having to deal with it in iteration. > Though I like it as an initial value of objects. > I'm surprised iteration has to deal with nil 'especially'. > I'd like it to be dealt with as a coding stlye-sheet issue. > Possibly I do not use collections enough. > A collection which garbage collects nils might help. > > All the best to all. collection = [ nil, :this, nil, :that ] collection.compact => [ :this, :that ] T.