On Wed, Mar 02, 2005 at 03:18:01PM +0900, ES wrote:
> On Wed, March 2, 2005 12:04 am, Jos Backus said:
[snip]
> It'd be great fun if exception handling could *literally* be described
> parallel to the method :)

I'm still trying to wrap my head around this. It sounds like you want a
special kind of method attribute that is itself a method that is invoked under
certain circumstances?

> <pre>
> 
> def foo()                      handler
>   # Do something
>   do_something()               fail? do fix_do_something(); retry :once; end
> 
>   # Other ops
>   if something_else
>     do_something_else()        fail? do fix_do_something_else(); retry 2; end
>   end
> end                            end
> 
> </pre>
> 
> Good work.

Thanks.
 
Two nits I found after sending:

> > # a list element is divisible by 3, if which case it is considered "bad".
                                        in
> >   def each(check)
> >     cc = nil		<-- not needed
> >     @arr.each do |elem|

-- 
Jos Backus
jos at catnook.com