News for hackers. Stuff that matters.
Re:Why Discord is switching from Go to Rust by terminaljunkid on Tuesday February 04, 2020 @09:03PM (#22243328)
> Swift doesn't have a GC slowing things down

This Apple marketing meme needs to die. Reference counting incurs arguably more cost than GC, or at least the cost is spread through-out processing.

Re:Why Discord is switching from Go to Rust by pkolaczk on Wednesday February 05, 2020 @01:31AM (#22244501)
It incurs some cost, but whether it is higher is very debatable. This is very much workload dependent. A smart compiler can elide most reference updates.
Re:Why Discord is switching from Go to Rust by pjmlp on Wednesday February 05, 2020 @09:45AM (#22247033)
No it can't, not in Swift's current implementation.

https://github.com/ixy-languages/ixy-languages

Re:Why Discord is switching from Go to Rust by abjKT26nO8 on Wednesday February 05, 2020 @03:45AM (#22245064)
It would seem that the Swift compiler is far from smart[1].

[1]: <https://media.ccc.de/v/35c3-9670-safe_and_secure_drivers_in_...

Re:Why Discord is switching from Go to Rust by arcticbull on Wednesday February 05, 2020 @01:34AM (#22244515)
Apple's ARC is not a GC in the classic sense. It doesn't stop the world and mark/sweep all of active memory. It's got "retain" and "release" calls automatically inserted and elided by the compiler to track reference counts at runtime, and when they hit zero, invoke a destructor. That's not even close to what most people think of when they think "gc". Of course it's not free, but it's deterministic.
Re:Why Discord is switching from Go to Rust by trevor-e on Wednesday February 05, 2020 @02:04AM (#22244648)
I think you are being borderline pedantic here. ARC _is_ GC in the classic sense: https://en.wikipedia.org/wiki/Garbage_collection_(computer_s...

I agree with you that most people tend to associate GC with something more advanced nowadays, like mark and sweep as you said in another comment, but it seems pointless to argue that ARC is not a form of GC.

Re:Why Discord is switching from Go to Rust by barrkel on Wednesday February 05, 2020 @05:37AM (#22245610)
You're using a hearsay, folklore definition of GC, not a CS one.

Refcounting in the presence of threads is usually non-deterministic too.

Re:Why Discord is switching from Go to Rust by pkolaczk on Wednesday February 05, 2020 @01:56PM (#22249918)
It is non deterministic, but at a much different scale.