16 May 12:10
Re: Matz: can we have rescue/else/ensure available in all blocks?
From: Michael Neumann <mneumann <at> ntecs.de>
Subject: Re: Matz: can we have rescue/else/ensure available in all blocks?
Newsgroups: gmane.comp.lang.ruby.general
Date: 2008-05-16 10:10:59 GMT
Subject: Re: Matz: can we have rescue/else/ensure available in all blocks?
Newsgroups: gmane.comp.lang.ruby.general
Date: 2008-05-16 10:10:59 GMT
coderrr wrote:
>> If you write code that looks like that, maybe you should give Java a
>> second look ;)
>>
>> Seriously though, you could easily restructure your code to be a bit
>> more OO and then you wouldn't have to worry about rescuing exceptions
>> all over the place, including several times in nested loops.
>>
>
> It was a contrived example. So would that be a "not in favor of"
from you
> Peter?
How would you have "rescue" and "ensure" blocks when using "{" and "}",
both of which are (almost) equivalent to "do" and "end"?
pages.each {|page|
...
}
Regards,
Michael
RSS Feed