From: George Ogata Date: 2004-03-21T00:24:37+09:00 Subject: Re: `#catch'ing many symbols "Robert Klemme" writes: > Well, that's not too difficult, since one often has an entry method to > recursion: > > def enter(*args) > catch :quit do > catch :done do > recur_impl(*args) > end > end > end > > def recur(*args) > catch :done do > recur_impl(*args) > end > end > > def recur_impl(*args) > if ... > recur x > else > ... > end > end It's not a case of it being difficult, I just think it's more naturally expressed the other way. Each to their own, I suppose. >> In my case, I have a stackable command interpreter interface >> ("stackable" in the sense that you can recursively invoke one while >> one is running, like the way you sometimes nest shells). One command >> exits just the topmost layer to return to the one below. Another >> exits the whole stack. > > Is that really a case for recursion? I think it's easiest done so, yes. > As I said, I don't think it's a reasonable extension... K.