News for hackers. Stuff that matters.
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.
Re:"14 Years of Go" by Rob Pike by campbel on Tuesday February 27, 2024 @01:50PM (#39527941)
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.

Re:"14 Years of Go" by Rob Pike by coldtea on Tuesday February 27, 2024 @02:06PM (#39528198)
In better languages they don't exist except as sugar, they're functions themselves.