News for hackers. Stuff that matters.
Re:Get familiar with workspaces by nkozyra on Monday April 11, 2022 @09:16PM (#30997395)
Pedantry on my part, but annotated does not mean including a stack trace, simply that it includes a description of the error. Given it's a non-nil check, you never gave a guarantee it's valuable, but the error is itself at minimum an annotation.

panic brings important context, but you're right in that it's not an annotation in itself. It's a program flow mechanism, but I'd argue it's very often utilized as an error flow one.

My larger point was that this still doesn't feel like an "antipattern" and I see that word thrown around enough as a conversation stopper that I've become pretty cynical about it.

Re:Get familiar with workspaces by preseinger on Monday April 11, 2022 @09:40PM (#30997573)
"Annotated" means given `err error`, you return `fmt.Errorf("annotation: %w", err)` — nothing more or less.