HackerTrans
TopNewTrendsCommentsPastAskShowJobs

typical_gopher

no profile record

comments

typical_gopher
·há 4 anos·discuss
> C++ and Java exceptions have non-local flow and it's hard to determine what function can throw what, so if you do want to add error handling cases you would have to inspect every function to know if it throws or not

In general I agree with you, but Rust is already having this problem by people making liberal use of unwrap.
typical_gopher
·há 4 anos·discuss
My only complaint about go error handling is that they are not encoded as unions/sum types/variants/choice types (whatever you want to call them), so in practice this leaves us the chore of checking and passing zero values and nils everywhere.

Sugar for error handling is already a solved problem (.e.g: Rust, Swift, or Zig).

Go will be damned by the community's NIH syndrome.