RetroFed Forums
Your home away from modern life.
The operator ^ for exponentiation or for excluding: how not to confuse them?
Post Reply
AuthorMessage
CodyIT
programming.dev

CodiUnicorn@programming.dev
Joined: 2024-09-30
Posted:   Subject: The operator ^ for exponentiation or for excluding: how not to confuse them? Quote

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?

5   Original
Multiplexer
discuss.tchncs.de
Multiplexer@discuss.tchncs.de
Joined: 2025-08-25
#2 Posted:   Subject: Re: The operator ^ for exponentiation or for excluding: how n... Quote Reply

There are languages that have a build-in operator for such complex things as exponentiation???
Today I learned...

- A flabbergasted C programmer -
:-)

1
I_quote_Seinfeld_a_lot
sh.itjust.works
I_quote_Seinfeld_a_lot@sh.itjust.works
Joined: 2025-03-02
#3 Posted:   Subject: Re: The operator ^ for exponentiation or for excluding: how n... Quote Reply

Is this just a desperate AI ad with a cheap call to action to increase engagement?

2
Post Reply Page 1