Re: Return value of try
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
I was listening to the recent IO conversation on p6c, and decided to look at IO.pm in rakudo. I immediately saw a bit of code that worried me: try { ?$!PIO.close() } $! ?? fail($!) !! Bool::True Why is that so cumbersome? That seems like one of the most obvious