4 ms·
> From CS point of view + is just a function name just like any other. From a Go point of view, it isn't.
by sagichmal 10y ago
> From CS point of view + is just a function name just like any other.
From a Go point of view, it isn't.
- pjmlp 10y agoJust because Go eschews decades of CS knowledge, in the name of the "easy to hire programmers" for Google[1], it doesn't make it less true. [1] - According to the language designers own words
- sheepmullet 10y agoThe point is in most languages operator overloading is no more complex than a method call. It's not exactly magic.
- nuggien 10y agoOverloading + could be magic if you want it to be. In go, + is exactly what you think it is. In languages with operator overloading, I literally could make + do whatever I wanted to.
- pjmlp 10y agoJust like you can make a function do something totally unrelated to how it is called, do what it is actually in the name, wipe out the hard drive, launch missiles, whatever.