3 ms·
I use Rust and Go. I think missing from this is a discussion about which projects might be more enjoyable to write in Go or Rust. Nearly all the automation an
by klodolph 6y ago
I use Rust and Go.
I think missing from this is a discussion about which projects might be more enjoyable to write in Go or Rust.
Nearly all the automation and web services I do is in Go. In Go it's easy to pull in libraries to work with other services. Everything from pushing Route 53 changes to making automated changes to HTML documents in a web server. Build pipelines that require orchestrating other processes. Development servers.
I sometimes reach for Rust when there's some more intense central algorithm or data structure I want to work with. This could be something like image manipulation or writing a compiler or parser. Writing a parser in Rust is a joy.
I'm going to make an unfair generalization: Go is more likely to get the job done, Rust is more likely to do the job well. Just my feelings on the matter.
As an illustration... if you are spawning a process, you don't really care about how efficient you are constructing the strings for the argument list. If you are writing a compiler, you do care about how efficient your string manipulation is.
- st1x7 6y ago> I'm going to make an unfair generalization: Go is more likely to get the job done, Rust is more likely to do the job well. Which job though? You said yourself that you use them for completely different things. Is Rust really more likely to do the job well (however we define that) if the job is to write services or orchestrate processes?
- klodolph 6y agoBite-size generalizations fall apart if you look at them too closely. For example, if you dissect "Go To Statement Considered Harmful" as a statement you'll find it very lacking, but that's okay, it's just the title for a paper and you can go read the actual paper if you want more details.
- Brian_K_White 6y agoThe generalization made sense to me.
- bitfield 6y ago> Go is more likely to get the job done, Rust is more likely to do the job well That's surprisingly close to what one of my contributors wrote in the piece: > My take: Go for the code that has to ship tomorrow, Rust for the code that has to keep running untouched for the next five years.