Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
July 21, 2019 11:34 am

Google Abandons Go's try() Function Proposal, Citing 'Overwhelming' Community Response

Google's Go programming language will not add a try() function in its next major version, "despite this being a major part of what was proposed," reports the Register:Error handling in Go is currently based on using if statements to compare a returned error value to nil. If it is nil, no error occurred. This requires developers to write a lot of if statements. "In general Go programs have too much code-checking errors and not enough code handling them," wrote Google principal engineer Russ Cox in an overview of the error-handling problem in Go. There was therefore a proposal to add a built-in try function which lets you eliminate many of the if statements and triggers a return from a function if an error is detected. The proposal was not for full exception handling, which is already present in Go via the panic and recover functions. That proposal has now been abandoned. Robert Griesemer, one of the original designers of Go, announced the decision in a post Tuesday... "Based on the overwhelming community response and extensive discussion here, we are marking this proposal declined ahead of schedule. As far as technical feedback, this discussion has helpfully identified some important considerations we missed, most notably the implications for adding debugging prints and analyzing code coverage. "More importantly, we have heard clearly the many people who argued that this proposal was not targeting a worthwhile problem. We still believe that error handling in Go is not perfect and can be meaningfully improved, but it is clear that we as a community need to talk more about what specific aspects of error handling are problems that we should address."

Read more of this story at Slashdot.


Original Link: http://rss.slashdot.org/~r/Slashdot/slashdot/~3/v24KRVIkNX0/google-abandons-gos-try-function-proposal-citing-overwhelming-community-response

Share this article:    Share on Facebook
View Full Article

Slashdot

Slashdot was originally created in September of 1997 by Rob "CmdrTaco" Malda. Today it is owned by Geeknet, Inc..

More About this Source Visit Slashdot