News for hackers. Stuff that matters.
Re:Declined Proposal: A built-in Go error check function, “try” by Cthulhu_ on Wednesday July 17, 2019 @07:08AM (#20458193)
Does anyone know if this was a conscious decision? I mean IIRC in Java you're generally discouraged from throwing errors for control flow because creating the stack trace is a relatively heavy process. In Go this is of less concern and returning an error is pretty normal for control flow (as in errors are expected, not exceptional), and you shouldn't have to worry that an error path would be 100x as expensive as a normal flow because a stack trace is being generated.
Re:Declined Proposal: A built-in Go error check function, “try” by EmpirePhoenix on Wednesday July 17, 2019 @09:18AM (#20459086)
Java allows since ~a decade time to omit the generation of stacktraces, for exactly such cases