4 ms·
Afaik Go does not have operator overloading and, hence, will never be popular for numerics, just like java never was (or will be). Python has this flexibility a
by pletnes 8y ago
Afaik Go does not have operator overloading and, hence, will never be popular for numerics, just like java never was (or will be). Python has this flexibility and allows for great numerics libs for this reason.
- _ph_ 8y agoYou are correct, Go does not have operator overloading. While that can be cute, I wonder how important that would be for numerics, as only a subset of the computations break down to + - * /. Also, for decades Fortran was the go to language for numerics, and still is. It also did not offer operator overloading.
- pletnes 8y agoFortran has had it since the 90s, but importantly,it has elementwise operations built right into the language. Python does not, but operator overloading allows for a good array library to be implemented (numpy). Many computations contain other functions, but the four arithmetic operations are very familiar and look godawful as add(multiply(5, 2), 7) instead of 5*2+7. All of linear algebra is aritmetics, as a prime example