Re:Go Developer Survey 2022 Q2 Results
by metaltyphoon on Thursday September 08, 2022 @04:07PM
(#32771331)
The thing with try/catch is that many times, code that throws doesn't have to be handled on the call site! So you can easily have a happy path and kick the bucket to a location where the error can ACTUALLY be handled property.
Record the error line number where the error happened. Use __builtin_return_address(0) to fink on the caller.
Idle thoughts. Despite it's provenience BASIC's on error goto has merit. The problem with try/catch is creating scoped blocks of code that's annoying.
vs Also a thought is having a separate error_return keyword. And the ability to mark functions with 'no error'