4 ms·
Not the OP, but I think a good contrast is with Rust. Both languages purportedly emphasise memory safety and concurrency. Rust achieves this within the type sys
by gnode 7y ago
Not the OP, but I think a good contrast is with Rust. Both languages purportedly emphasise memory safety and concurrency. Rust achieves this within the type system at compile-time; no nil pointers (conditional destructuring is used instead), no garbage collection is required, and concurrency is safe by virtue of compile-time checks. In Golang nil pointers exist and can be dereferenced, you can make a mistake when using concurrency primatives, and clobber shared memory.
On the other hand, Golang is a much simpler language. It's relatively easy to learn and understand.
- hu3 7y agoI wouldn't compare Go to Rust. Their sensible usecases rarely intersect. They are quite far apart in many spectrums.
- gnode 7y agoSome popular Rust projects include actix-web (HTTP serving), diesel (database ORM), Firecracker (micro VMs for serverless). Web APIs and virtualisation / cloud computing are also areas where Go is popular. They're both statically typed compiled system programming languages; both trying to provide solutions for safe memory and concurrency.
- hu3 7y agoIt's common for different languages to have libraries that aim to solve the same problems like ORM and web server. Perl and Lisp have these as well. But this doesn't necessarily mean that these languages share a great deal of sensible usecases. Rust and Go make very different tradeoffs.