From: Leslie Viljoen Date: 2006-05-24T06:36:32+09:00 Subject: Re: How to "go to" in a RUBY script . . . On 5/23/06, Ryan Leavengood wrote: > On 5/23/06, Simen wrote: > > > > There's also continuations. They're not only for web frameworks, you > > know. It's fairly easy to write something goto-like with continuations. > > I once did, for fun. You could do stuff like > > > > label :loop > > [code] > > goto :loop > > > > Easy to abuse, fun to write. Still, catch/throw should be sufficient > > most of the time. > > This did sound fun, here is my quick and dirty implementation: I am so amazed by how versatile and expressive Ruby is. It's almost as if it was designed in a way that made a whole lot of things possible even though the designer(s) didn't think of them. Thanks Matz! I don't know if I'll ever use continuations but it's good to have the tool in the shed. Les