Would it be possible for Go to implement Rust's ownership concept?

I am really torn between Go and Rust (and I have been for a while). I like it more than rust in pretty much all ways except that Rust seems more secure against race conditions because of its system of reference ownership (basically a reference can only be mutable from a single context at a time).

That said, I think it would be difficult for Rust to implement Go’s simplicity and pare down its already incredibly complex language, but it is conceivable to me that Go could implement Rust’s features, ownership in particular, in the future.

Is this possible?

1 Like

I already asked that question. The answer was no:

  1. Go’s DNA for concurrency is buried deep within the language and compiler design. Hard to change.
  2. Rust already exists. If you want the Rust concurrency mode, use Rust.

I think a better approach is to use Go, but follow certain rules when writing concurrent code.

Katherine Cox-Buday’s book “Concurrency in Go” is FABULOUS!

https://www.amazon.com/Concurrency-Go-Tools-Techniques-Developers/dp/1491941197

Just buy it, read it, chew on it, and internalize it. Then all the nasty Rust indigestion will Go away. :slight_smile:

Good luck.

Jeff Kayser

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.