News for hackers. Stuff that matters.
Re:Safe and Secure Drivers in High-Level Languages [video] by zozbot123 on Sunday December 30, 2018 @08:01AM (#18788968)
Rust also uses refcounting, not tracing GC. The problem with Swift is its use of obligate GC for things that don't need it in other languages (C/C++, Rust).
Re:Safe and Secure Drivers in High-Level Languages [video] by pjmlp on Sunday December 30, 2018 @08:15AM (#18789025)
Rust doesn't do refcounting, it makes use of an affine type system, which is something completly different.

If you make use of the refcounting library types in Rust, from the std::rc and std::sync crates, the performace impact would be quite similar.

Re:Safe and Secure Drivers in High-Level Languages [video] by zozbot123 on Sunday December 30, 2018 @08:22AM (#18789052)
Sure, but you don't need refcounting for cases that are covered by Rust's affine types, even in C/C++. You can use the patterns described in the C++ Core Guidelines, and end up with something quite rusty, only without fully-automated checking.

(Besides, I think std::rc has better performance than the refcounts found in Swift and C++, because it's used in cases that don't need atomic update, and yes this is statically checked too.)

Re:Safe and Secure Drivers in High-Level Languages [video] by pjmlp on Sunday December 30, 2018 @08:56AM (#18789175)
> You can use the patterns described in the C++ Core Guidelines, and end up with something quite rusty, only without fully-automated checking.

Also known as the mythical "only other programmers commit errors, I am always correct".

Re:Safe and Secure Drivers in High-Level Languages [video] by asdkhadsj on Sunday December 30, 2018 @09:16AM (#18789263)
Yea, I'm not sure what point was being made there. Rust isn't about being faster than C, it's about not letting you make mistakes you can make in C/etc.

If you could somehow write perfect code in a timely manner, you'd have no need for Rust. You'd likely also be a unicorn.

Re:Safe and Secure Drivers in High-Level Languages [video] by steveklabnik on Sunday December 30, 2018 @09:07AM (#18789229)
You also only need to bump the counts on Rc<T>/Arc<T> for each owner, not for every reference, which reduces refcount traffic.
Re:Safe and Secure Drivers in High-Level Languages [video] by mmirate3 on Sunday December 30, 2018 @09:19AM (#18789279)
> only without fully-automated checking

The fully-automated checking is precisely what allows one to write unmanaged code without tearing one's hair out.