[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: retry does not work

T. Onoma

11/20/2003 11:28:00 AM


> "resume" won't work well unless both your code and the user code know
> each other (the user code must care that raise might resume; your code
> must know how to fix up the exception cause). In that case, I think
> you can make "retry" work, otherwise you can't make them work well
> anyway.

that is a good point, but the alternative seems to be passing proc or passing self. self seems like over kill, but passing proc is messy. no win situation here? perhaps this suggests another facility like raise but that does not halt execution. rather it moves up the call chain looking for a handler, if it finds one it executes, if not forget it, and then resumes execution. better RCR?

thanks,
-t0

1 Answer

matz

11/20/2003 11:51:00 AM

0

Hi,

In message "Re: retry does not work"
on 03/11/20, "T. Onoma" <transami@runbox.com> writes:

|that is a good point, but the alternative seems to be passing proc or passing self. self seems like over kill, but passing proc is messy. no win situation here? perhaps this suggests another facility like raise but that does not halt execution. rather it moves up the call chain looking for a handler, if it finds one it executes, if not forget it, and then resumes execution. better RCR?

It's called "coroutine". If you are going to write new RCR, I
recommend you to google it first.

matz.