4 ms·
Any reason to choose Rust over Go in your case?
by beforeolives 5y ago
Any reason to choose Rust over Go in your case?
- cjg 5y agoA couple of reasons: 1. We like the thread-safety properties that Rust offers 2. We don't have any Go experience Does Go offer similar guarantees for concurrency?
- steveklabnik 5y agoGo does runtime instrumentation to detect data races, rather than compile time checks.
- pdpi 5y agoGo doesn’t offer the same sort of guarantees as Rust does, but the goroutine/channel model nudges you towards a safe style
- zozbot234 5y agoGo is memory safe for purely sequential code. It's not memory safe to share memory-write access among multiple Go threads. Using CSP idioms only, via Go channels, can preserve memory safety, but is prone to more general race conditions.
- pjmlp 5y agoAlthough better, Rust can only protect against races coming from threads accessing in-memory resources. For races related to external resources, or caused by misuse of OS IPC mechanisms (which is the future thanks Spectre), it offers as much protection as any other language.