From: Yugui Date: 2011-01-21T21:06:29+09:00 Subject: [ruby-core:34727] Re: Ruby operator equivalent to Groovy's "?." On Fri, Jan 21, 2011 at 3:34 AM, Jan Lelis wrote: > You could also use the egonil or andand > gem . These libraries are cool. I think Ruby should not have special syntax for nil any more because the preferred definition of blankness depend on domain. There are many semantics for blankness other than nil?. In the domain of web application, the empty string or " " should be blank. That's why ActiveSupport has Object#blank?. On the other hand, the approach of egonil or andand does not enforce a particular semantics upon users who do not want it. That's cool. By the way, I have an experience of developing a Rails application with NilClass#method_missing that returns nil. That was a terrible work. It worked fine with views but also it concealed bugs in our business logic. It was something like "On Error Resume Next" at the top level. -- Yuki Sonoda (Yugui) yugui@yugui.jp http://yugui.jp