by Thaxll · 7y ago · 0 comments
It's similar in Go since you can't compile with unused variable so you need to explicitly discard the error with _. Ex: result, _ := func() This is for multi-value returns, for single value you can even omit the _
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.
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