5 ms·
Yes, you’re right. The Go team was originally targeting use in C++-like applications, but was surprised to see Go catching on more among Python programmers than
by paulsutter 8y ago
Yes, you’re right. The Go team was originally targeting use in C++-like applications, but was surprised to see Go catching on more among Python programmers than C++ programmers.
I would also suggest trying Python itself (why not go all the way?). Personally I write quick hacks in Python and real code in C++, and find Go to be an interesting middle ground. Python will do more to stretch your idea of programming. Maybe someday Go will get numpy and tensorflow.
- pietroglyph 8y agoI'm not sure if this is what you meant, but there are actually supported Tensorflow bindings for Go. They're quite usable (at least for me when I used them for inference), relatively idiomatic, and well documented. See https://godoc.org/github.com/tensorflow/tensorflow/tensorflow/go https://godoc.org/github.com/tensorflow/tensorflow/tensorflo...
- weberc2 8y agoAlso I’m not sure exactly what Numpy is but Go probably has an analog as it already has a suite of scientific computing libraries (check out gonum as a starting point).
- pletnes 8y agoAfaik 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
- pjmlp 8y agoGiven their stance against generics, enumerations, operators, exceptions, ... it was only natural that we wouldn't spend that much time looking at Go. Also C++ did not stand still and even the compile times are slowly becoming a thing of the past, with incremental compiler and linking, and modules support. Maybe if Go 2.0 gets done right, it gets another look from us.