Re:"14 Years of Go" by Rob Pike
by anonymoushn on Tuesday February 27, 2024 @01:43PM
(#39527838)
That's true, we should get rid of operators for primitives too.
[ Parent
| on HN ]
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.