Re: Return value of try

2010-11-15 Thread Ruud H.G. van Tol
On 2010-11-15 23:46, Aaron Sherman wrote: try { ?$!PIO.close() } $! ?? fail($!) !! Bool::True Probably try{} can be made to return a True when there was no exception? try { ... 1; } or fail( ... ); try { ...

Return value of try

2010-11-15 Thread Aaron Sherman
obvious use-cases for exceptions. I looked over the synopses and tested some theories, but what I came to was inconclusive. It seems like: return try { die "oops" } has undefined behavior because the return value of try is not clearly spelled out (one might expect it to be the return va