On Sat, Jan 5, 2013 at 11:29 PM, Joel Pearson <[email protected]> wrote:
> There's only one time I can think of where I use "or" for the sake of > readability. I'll often have a main method call a series of other > methods, each of which returns a boolean, and sets the error level as a > way of reporting failure. That is then passed to the errorhandler. This > leads to some simple lines like this: > > boolean_return_method or fail There is already too much written about using return values for error handling. So I'll only say that I don't think this kind of design is good. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ -- You received this message because you are subscribed to the Google Groups ruby-talk-google group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/ruby-talk-google?hl=en
