develooper Front page | perl.perl5.porters | Postings from January 2021

Re: Adding a try/catch syntax to Perl

Thread Previous | Thread Next
From:
Andy Broad
Date:
January 24, 2021 20:06
Subject:
Re: Adding a try/catch syntax to Perl
Message ID:
51002958615.4a4f88d9@mysmtp.broad.ology.org.uk
On 23/01/2021, Philip R Brenan wrote:



> Proof by contradiction: If you can write code in the catch block that
> does not fail then why can you not write code in the try block that
> does not fail in the first place and thereby obviate the need for a
> try/catch at all?

Code might fail because a resource is unavailable, and so failure might be
exactly the right outcome.





Regards


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About