News for hackers. Stuff that matters.
Re:Declined Proposal: A built-in Go error check function, “try” by jpittis on Tuesday July 16, 2019 @10:55PM (#20456011)
Having unwrap() in your Rust code is like littering your code base with panic(). It’s not appropriate to use in most production code, but is convenient in prototypes, examples and tests.

Your example re Go errors is incorrect. The go compiler allows you to ignore errors in returns without any compiler error.

For example

err := doThingThatErrs()

and

doThingThatErrs()

are both valid Go code.

Re:Declined Proposal: A built-in Go error check function, “try” by edflsafoiewq on Wednesday July 17, 2019 @01:48AM (#20456836)
There's nothing wrong with unwrap. It's just an assert. Even a[i] is just shorthand for a.get(i).unwrap(). Asserts are definitely appropriate in production code, just not for handling run-time errors.
Re:Declined Proposal: A built-in Go error check function, “try” by jbverschoor on Wednesday July 17, 2019 @03:20AM (#20457252)
Then how is this better than anything else? Except for syntactical sugar for:

Try Return [Bla(), null] Catch err Return [null, err] End

I do like this syntax better, bc the different scopes cause a lot of nesting

Re:Declined Proposal: A built-in Go error check function, “try” by Thaxll on Tuesday July 16, 2019 @11:18PM (#20456112)
My example is correct I explained all of that, multi values -> need to omit, single value can ignore everything.
Re:Declined Proposal: A built-in Go error check function, “try” by jpittis on Wednesday July 17, 2019 @01:26AM (#20456723)
Yup. I misspoke. We’re both right.