Categories
Technology

‘Kerfuffle’ Erupts Around Newly-Proposed try() Feature For Go Language

Matt Klein, a member of the Go steering committee recently apologized for the angst caused to some people by “the try() kerfuffle… Change is hard, but sometimes it’s for the best.”

Tech columnist Mike Melanson covers the kerfuffle over the newly-proposed feature, while trying “not to over-dramatize what is happening.”

There is disagreement and conflicting views, but working through those views is how the open source sausage is made, is it not? Of course, in the Go community, how the core team receives those opposing views may be a point of soreness among some who vehemently opposed the vgo package versioning for Go and felt that, in the end, it was rammed through despite their objections. As one Gopher points out, it is better to debate now than summarily accept and then later deprecate…

As Go makes its way to Go 2.0, with Go 1.14 currently taking center stage for debate, there is, again, as Klein points out, some kerfuffle about a newly proposed feature called try(), which is “designed specifically to eliminate the boilerplate if statements typically associated with error handling in Go.” According to the proposal, the “minimal approach addresses most common scenarios while adding very little complexity to the language” and “is easy to explain, straightforward to implement, orthogonal to other language constructs, and fully backward-compatible” as well as extensible for future needs.

Much of the disagreement around try() comes in the form of whether or not the resultant code is more or less readable than current implementations of error handling. Beyond that, however, some say that even if try() were accepted, it has faults that would prevent them from recommending or even allowing its use among their teams. Meanwhile, another point of contention is offered in an open letter to the Go team about try by William Kennedy who often writes about Go, and focuses on not style or function, but rather whether or not a solution is needed at all. According to Kennedy, “the perceived error handling complaints are perhaps overblown and these changes are not what the majority of Go developers want or need” and that try() may be a solution searching for a problem, and even the cause of more problems than it solves.”Since this new mechanic is going to cause severe inconsistencies in code bases, disagreements on teams, and create an impossible task for product owners to enforce consistent guidelines, things need to be slowed down and more data needs to be gathered,” Kennedy writes.

He goes on to point out those very sensitivities that may have lingered from previous discussions in the Go community. “This is a serious change and it feels like it’s being pushed through without a concerted effort to understand exactly what those 5% of Go developers meant when they said they wanted improved error handling….”


Share on Google+

View source

Codice amico Very Mobile Diagonal Media Digital Marketing