Retry does not work

matz:

Your “resume” makes exception handling much harder. With “resume”,
every raise can be re-entered, that means programmers need to care
about re-entrance always.

So allowing new thing is not always a good thing.

worry? isn’t that what testers are for :wink:

okay, so maybe there could be an option put on raise to allow resuming?

just as an example of what this could do: tanaka is adding hook into open_uri to do progress reporting of download. to make it work you have to pass a lambda that acts on progress. but with resume you could raise a ProgressException(pos) and resume, which is much cleaner.

-t0

Hi,

···

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

just as an example of what this could do: tanaka is adding hook into open_uri to do progress reporting of download. to make it work you have to pass a lambda that acts on progress. but with resume you could raise a ProgressException(pos) and resume, which is much cleaner.

Sounds like exception abuse for me. You can use continuation if you
want to do something like that.

						matz.

“Yukihiro Matsumoto” matz@ruby-lang.org schrieb im Newsbeitrag
news:1069327343.081885.18914.nullmailer@picachu.netlab.jp…

Hi,

just as an example of what this could do: tanaka is adding hook into
open_uri to do progress reporting of download. to make it work you have to
pass a lambda that acts on progress. but with resume you could raise a
ProgressException(pos) and resume, which is much cleaner.

Sounds like exception abuse for me.

Definitely! That’s not an exceptional condition, but rather a case for
regular invocation of a callback.

You can use continuation if you
want to do something like that.

Isn’t that a bit overkill? Hm…

robert
···

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

Hi,

···

In message “Re: retry does not work” on 03/11/20, “Robert Klemme” bob.news@gmx.net writes:

You can use continuation if you
want to do something like that.

Isn’t that a bit overkill? Hm…

“resume” (or coroutine) requires continuation anyway.

						matz.

“Yukihiro Matsumoto” matz@ruby-lang.org schrieb im Newsbeitrag
news:1069362449.622441.23124.nullmailer@picachu.netlab.jp…

Hi,

You can use continuation if you
want to do something like that.

Isn’t that a bit overkill? Hm…

“resume” (or coroutine) requires continuation anyway.

Well, yes. It’s just that it seems to me that “resume” is not the
appropriate means for signallin status events. That loooks more like
Observer which can be implemented without “resume” and continuations.

Regards

robert
···

In message “Re: retry does not work” > on 03/11/20, “Robert Klemme” bob.news@gmx.net writes:

Hi,

···

In message “Re: retry does not work” on 03/11/21, “Robert Klemme” bob.news@gmx.net writes:

“resume” (or coroutine) requires continuation anyway.

Well, yes. It’s just that it seems to me that “resume” is not the
appropriate means for signallin status events. That loooks more like
Observer which can be implemented without “resume” and continuations.

I don’t know. Transami wanted something, which is known as coroutine.
If he really wanted that something, continuation is the best way to
implement it. Maybe it’s overkill, or maybe not.

						matz.

that’s the passing of self method. there is also pass proce method. my resume
continuation method (which does not work) and me betes there’s a couple more.
$global.call probably has one in there somewere too. BUT…

_why has given us better way: singleton methods with ducktyping! IMHO Perfect!

-t0

···

On Friday 21 November 2003 09:32 am, Robert Klemme wrote:

Well, yes. It’s just that it seems to me that “resume” is not the
appropriate means for signallin status events. That loooks more like
Observer which can be implemented without “resume” and continuations.