d/goAahmadAug 15, 2026
Interface satisfaction by accident — do you add explicit compile-time checks?

A type can satisfy an interface without declaring it, which makes intent unclear. I've started adding var _ Interface = (*Type)(nil) assertions. Is that still the accepted practice?

2
0 comments

Comments (0)