3 ms·
Operators for primitive types are fine, they are well defined by the language and consistent across programs. Operator overloading is going to change behavior b
by campbel 3y ago
Operators for primitive types are fine, they are well defined by the language and consistent across programs. Operator overloading is going to change behavior between programs which puts extra cognitive load on the reader.
That said, Go sticks to the most basic operator implementation (strings, numbers etc...). Go doesn't support `+` on slices for instance.