top | item 38935386

(no title)

sidlls | 2 years ago

https://cs.opensource.google/go/go/+/refs/tags/go1.21.6:src/...

discuss

order

derekperkins|2 years ago

I wouldn't classify type assertion as reflection. It's a super fast type check of the object header, not dynamic reflection.

Thaxll|2 years ago

But this is a detail of implementation, user code does not use reflection with errors.

sidlls|2 years ago

That "detail of implementation" is what is used by user code, e.g., `myError.As(...)` uses reflection, implicitly.