I believe what you're discussing in this case is function or method overloading. Operator overloading refers to the ability to specify custom behavior for operators like +, -, etc.
On Sat, Sep 8, 2018 at 6:58 PM Rick <thesuggestednamesareaw...@gmail.com> wrote: > With recent discussion concerning the possible introduction of generics in > Go 2, it occurs to me to ask about support for operator overloading in Go > 2. By this I mean support for functions having the same name but different > signature: > > func foo(x int) int ... > > func foo(x string) bool ... > > func foo(x int, y string) ... > > etc. > > Is support for operator overloading implied by support for generics? Is it > possible to have one with the other? To be honest, I've been more bothered > by the lack of operator overloading than by the absence of generics. And (I > assume) no new syntax would be required to support overloading. Or would > there? > > > -- > 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. > For more options, visit https://groups.google.com/d/optout. > -- 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. For more options, visit https://groups.google.com/d/optout.