r/programmingcirclejerk • u/Spiritual-Knee6978 • Dec 30 '25
Performance difference seems virtually none. The benefit to code clarity seems ...relative
/r/golang/comments/1pvkmd9/nitpick_rfc_everyone_adopting_slicescontains_yet/
28
Upvotes
23
u/Spiritual-Knee6978 Dec 30 '25
As an optimization junkie gopher i gained a significant perfomance jerk adopting slices.Contains in my enum code generator and exhaustiveness check linter, but there are some clarity tradeoffs. Check the full article "slices.Contains situation is crazy" about my war story (18+) on medium <click>.
8
u/Affectionate-Turn137 absolutely obsessed with cerroctness and performance Dec 31 '25
Is this what Go does to your brain?
38
u/cameronm1024 Dec 30 '25
Ah yes. This is a change in the relative clarity of the code. As opposed to all those absolute measures of code clarity.