News for hackers. Stuff that matters.
Re:Why Discord is switching from Go to Rust by anarazel on Tuesday February 04, 2020 @08:19PM (#22243102)
Really depends on the domain. There's some things that are a lot easier to make scale up in a language with a great concurrent gc, because that makes writing some lock free data structures quite fundamentally easier (no complicated memory reclamation logic, trivial to avoid ABA problems).
Re:Why Discord is switching from Go to Rust by pkolaczk on Wednesday February 05, 2020 @02:36AM (#22244767)
GC makes it easier to write, but not necessarily better. Modern state-of-the-art Java GCs operate a global heap, so you often pay for what you do not use. In languages like Rust or C++ your can build small locally GCed heaps, where you can limit GC overhead to just a few particular structures that need GC, not everything. Therefore other structures like caches don't affect GC pause times.

And the "hardness" of writing lockless structures is strongly offset by libraries, so unless you're doing something very exotic, it is rarely a real problem.

Re:Why Discord is switching from Go to Rust by BenFrantzDale on Wednesday February 05, 2020 @09:25PM (#22252952)
“GC makes it easier to write.” I disagree. GC means I don’t get deterministic destruction which means I can’t use RAII properly.
Re:Why Discord is switching from Go to Rust by pkolaczk on Thursday February 06, 2020 @03:27AM (#22254442)
The post was about writing lockless structures. With lockless RAII is of no use. See ABA problem. RAII is awesome in other places.