The operator ^ for exponentiation or for excluding: how not to confuse them? (pvs-studio.com)
from CodiUnicorn@programming.dev to golang@programming.dev on 06 Mar 11:22
https://programming.dev/post/46767538

Gophers, hey. Confusing ^ with exponentiation instead of XOR in Go seems like a pretty easy mistake to make. The bug itself is simple, but it still shows up even in some well-known projects with large codebases.

How often does this happen in your code?

#golang

threaded - newest

[deleted] on 06 Mar 11:36 collapse
.