Hacker News new | ask | show | jobs
by nickysielicki 4054 days ago
When you first look at go, you might think, "gee, this language sucks. What is this? A compiled language with pointers, structs, that's not object oriented? And it has garbage collection? WTF. Okay, so this is meant to replace C/C++?"

Nope. Go and Rust are almost entirely orthogonal in their best use cases.

Go is a langauge for people somewhat comfortable in low level langauges that want to high level things in a somewhat performant way. The older alternative is probably python.

Rust is a language for people moderately comfortable in low level languages that want to do moderately low level things in a complex way. The older alternative is C++.

C is a language for people very comfortable in low level langauges that want to do very low level things. The older alternative is assembly.

2 comments

Go and Rust are almost entirely orthogonal in their best use cases.

I disagree. I think in many (but not all) use cases, Go and Rust are direct competitors. However, they embody a different philosophy. It's New Jersey (worse is better) vs. MIT style all over again.

One can read Gabriel's[1] descriptions of both styles and they map exactly to Go and Rust. Given Go's heritage this is, of course, not surprising.

[1] https://en.wikipedia.org/wiki/Worse_is_better

I agree that their philosophies are very different, but I still hold that their use cases do not align so much.

For me at least, go has mostly taken the role that scripting languages sit in. I surely wouldn't want to write scripts in rust.

What are some of the use cases that you think they share?

Agree. Go is made for web/distributed programming: builtin concurrency, battery-included library with great support for http utils, including a production-ready server and other stuff like RPC. And the distribution is just so easy.

For a Pythoner, Go almost solves all my pain points for python, notably the lack of support for real multi-threading so that for long running task we have to turn into processes based 3rd party library like celery/rq with a message queue as intermediate layer, while comes with a relative familiar favor of syntax.

Go is a pragmatic minimalist language, with limited but cohesive set of features that stays at its core. I don't know rust very well, but from what I gather from HN, looks like that it aims to be a more comprehensive solution rather than 'opinionated' one in case of Go.