4 ms·
> With similar ease of development to Python Isn't the goal of general typed languages like Go or Rust to run -not build- the scripts of softwares in data scien
by vallas 6y ago
> With similar ease of development to Python
Isn't the goal of general typed languages like Go or Rust to run -not build- the scripts of softwares in data science for example? I wouldn't compare Python and Go, it's different use case to me.
While Go looks to be in the middle, Rust is at the opposite of Python and it must be a good to choice for building data software that run data scripts.
> The [Go] lack of operator overloading
=> https://doc.rust-lang.org/rust-by-example/trait/ops.html https://doc.rust-lang.org/rust-by-example/trait/ops.html
> The [Go] lack of generics
=> https://doc.rust-lang.org/book/ch10-01-syntax.html https://doc.rust-lang.org/book/ch10-01-syntax.html
> not being able to use algebraic operators for matrix and tensor libraries
https://tensorflow.github.io/rust/tensorflow/struct.Tensor.html https://tensorflow.github.io/rust/tensorflow/struct.Tensor.h...
- s17n 6y agoAt Google, Go is mostly used for stuff that they would have used Python for in the past. Idk about the rest of the world.
- great_reversal 6y agoCurrently working as a backend dev in a mid-sized company. Current directive is a gradual migration to Go for backend services that used to be written in Python/Django.
- CameronNemo 6y agoWhy?
- AlexCoventry 6y agoGo is a more restrictive language, which makes it slightly harder to create horrible codebases. It's also faster and a bit cheaper to deploy.
- DangitBobby 6y ago> which makes it slightly harder to create horrible codebases Going to have to strongly disagree. It forces you to make horrible codebases with endless boilerplate code and increased complexity introduced by workarounds for abstractions you can suddenly no longer make due to questionable language limitations. You will get improved performance, however.
- logicchains 6y agoAny abstraction possible in Python can be expressed in Go just via the interface{} type, as the type of everything in Python is just interface{}.
- DangitBobby 6y agoWhether something can technically be done and whether it is good/easy/simple/etc. are totally different conversations. I'm pretty sure you can't implement a min function that works on both strings and ints in Go by using the interface{} abstraction.
- fauigerzigerk 6y agoNo, that's not true at all. Just try to create an OrderedMap that supports the same abstract interface as Go's built-in map type, or try to implement a decimal floating point type that supports the same operators as the built-in binary floating point type. It's not possible.
- AlexCoventry 6y agoI've seen people complain about that, but I've been using golang for over two years, and I haven't really had to face that pain, yet. I used python for twenty years prior to that, and love sophisticated programming constructions (did a lot of work with clojure, learnt haskell, went through On Lisp), so it's not as if I don't know what I'm missing.
- micro_cam 6y agoOne of the original intents of go was to make a static, compiled language that felt familiar to python/ruby programers. This manifests as a really concise syntax (type inference via := etc) and a tight development loop enabled by fast compilation times (enabled by being strict about unused dependencies etc). I was for a time optimistic you could use it as your scripting language without much downside and get all the upside of compiled static types. Rust looks cool and I want to do a project in it at some point but at the moment I'm most optimistic about python with optional type annotations that are understood by compilers and alternative runtimes.