There's a big difference between creating arbitrary operators like c++, and just allowing the predefined set of operators to be implemented for custom types only. The later, combined with the overall aversion of the Go community towards operator overloading as a whole, will probably lead to very conservative use overall, with the added benefits listed by OP, and egronomic benefits to using certain mathematical types in Go, such as matrices.
On Saturday, August 8, 2020 at 11:02:04 AM UTC+2 axel.wa...@googlemail.com wrote: > On Sat, Aug 8, 2020 at 5:58 AM 'Carla Pfaff' via golang-nuts < > golan...@googlegroups.com> wrote: > >> On Saturday, 8 August 2020 at 01:33:59 UTC+2 Patrick Smith wrote: >> >>> if we think it likely that a future version of Go will allow operator >>> overloading >>> >> >> That's highly unlikely: https://golang.org/doc/faq#overloading >> > > That seems like a very strong reading of "it seems more a convenience than > an absolute requirement. Again, things are simpler without it". In > particular, generics change the equation for its usefulness (as discussed > in this thread). > > I'm not saying Go *will* get operator overloading or even that it *should* > get it, but I don't think that FAQ-section is an argument that it *won't*. > >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to golang-nuts...@googlegroups.com. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/golang-nuts/eb62bd8d-9310-4eb4-8125-bebda7bd6594n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/golang-nuts/eb62bd8d-9310-4eb4-8125-bebda7bd6594n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/e26f0c07-9c0f-4580-9526-893da8c333e0n%40googlegroups.com.