[J3] [EXTERNAL] Re: Exception handling - Golang proposal

Robert Corbett rpcorbett at att.net
Wed Jul 24 13:29:30 EDT 2019


The FAQ on the golang website explains that Go does not provide exceptions because the designers found the block structured exception handling mechanisms provided by other languages to be error prone.  Go allows functions to return multiple values.  The recommended way of handling exceptions in Go is to return an error status as one of the return values.

The rationale given for adding the try function was to provide a means of detecting an exception without having to write conditional statements for that purpose following each function invocation.

Bob Corbett

> On Jul 24, 2019, at 9:48 AM, Van Snyder via J3 <j3 at mailman.j3-fortran.org> wrote:
> 
> The proposal rejected for "Go" was for a "try" function, which was
> distinct from already-existing block-structured exception handling.  Its
> effect, as far as I can tell from the web article, would be to establish
> a "hidden" reeturn point for which the use was commonplace.
> 
> Exceptions should be used for exceptional conditions, not expected ones.
> 
> So far, nobody has proposed anything like the "try" function for
> Fortran.
> 
>> On Mon, 2019-07-22 at 19:21 -0400, Steve Lionel via J3 wrote:
>> Earlier I sent a message telling people about Golang's plan on adding
>> a block form of exception handling, and the various points of view on
>> that from their community. I now see that the idea has been killed -
>> https://www.theregister.co.uk/2019/07/17/google_go_team_try_keyword/ Perhaps some lessons for us there. I am sympathetic to the notion that this may be too much for us to take on this round. We'll have active discussion in Tokyo, I am sure.
>> 
>> 
>> Steve
>> 
>> 
>> 
> 
> 



More information about the J3 mailing list